Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use a UDF in SQL ?
Message
 
To
31/01/2003 09:42:34
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00747648
Message ID:
00747684
Views:
19
If I stand correct, your function needs to be public in a module and you must create a query with your SELECT statement. Then, in VB, you SELECT the query.


>I have a simple SQL statement as:
> strSQL = "SELECT SSN, LName_only(Full_name) AS LNAME FROM EMPLOYEES" .
> oConn.Execute strSQL
>
>Using VB6, ADO, Access97 MDB data.
>
>Everything works fine, except my UDF LName_only() is UNDEFINED during runtime.
>I have tried putting the UDF EVERYWHERE I could think of.
>( The UDF merely grabs the first part of a name string up to the comma. )
>
>I must be missing something really basic. Any ideas ?
>
>Thanks much,
>Steve H
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform