|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to run user create function in sql script
Database : MsAccess XP
Tabel Name : UserMast Field UserMast : Name (Chr), Password(Chr), Joint_Dt(Date). Exp_Dt(Date) rs.open "select rtrim(left(name, 15)) As Name, Format(joint_dt, 'yyyy/mm/dd') as Joint, rtrim(password) as password from UserMast order password", Con,adOpenStatic, adLockOptimistic this is not problem but rs.open "select rtrim(left(name, 15)) As Name, Format(joint_dt, 'yyyy/mm/dd') as Joint, rtrim(decpass(password)) from UserMast order password", Con,adOpenStatic, adLockOptimistic in vb modul, i create public function decpass(stPass As String) as string marr = array("26","25",..."02","01" ) mtem = "" for i = 1 to len(stPass) mtem = mtem+marr(i) next decpass = mtem end function I get error undefined funtion decpass in expression Can I have same help? |
|
#2
|
||||
|
||||
|
You cannot use a function declared in VB in MS Acess.. what u can do is first select password value from access and then apply the vb function on that value...
Code:
rs.open "select rtrim(left(name, 15)) As Name, Format(joint_dt, 'yyyy/mm/dd') as Joint, rtrim(password) as password from UserMast order password", Con,adOpenStatic, adLockOptimistic password1 = decpass(rs(2))
__________________
Do, or do not. There is no 'try'. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to run user create function in sql script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|