Hello Everybody
I have an access database "test.mdb" . in it i have
modules as
module1:
public function sinevalue (value as double) as double
sinevalue = sin (value)
end function
query as
query1:
SELECT sinevalue (?) As Expr1 From CorrectTable;
I wrote a VB program which uses ADO to connect to the database as :
Private Sub Form_Load
dim cnn as new adodb.connection
dim cat as new adox.catalog
dim cmd as new adodb.cmd
dim rs as new adodb.recordset
with conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open "c:\data\correct.mdb"
end with
cat.activeconnection = conn
set cmd = cat.Procedures(0).Command
cmd.CommandType = adCmdStoredProc
set rs = cmd.Execute (,"CorrectTable!FieldX")
end sub
I get an error in Cmd.Execute as " Undefined Function sinevalue in expression" can someone kindly tell me how to get over this and use the functions in the database ? or can I have the function in the local vb program and get it working ?
thanks a lot
sincerely
sathza


Reply With Quote