Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 using a vb functio in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-16 : 10:05:15
matthew writes "i'm doing a project at college and could do with your help.
i've never looked at sql before but need to use it in my access database, i was wondering how i get the sql code to call a vb functin.

i have a functio called "test" this will eventually return a value, i want to use this value in a sql query,

also is there any was i can use VBA to wright SQL script and run it."

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2002-04-16 : 10:47:43
If it's a normal Access query, then you can do it. All you need to do is make sure that your function is declared as Public, so the rest of the application can see it. Just remember that it will slow down your query.
If it's a pass-through query (meaning it's executed on the server), then forget it. SQL only allows it's own functions to be called from a query. You can create your own in SQL 2000, but they need to be written in T-SQL.

Hope this helps


Go to Top of Page
   

- Advertisement -