Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Posts
    4

    Unanswered: can i use UDF in sql when i programing with VB?Thanks

    i want to use a user defined function in my sql statment,like this:

    mydb.EXECUTE "SELECT myfunc(tbl1.fld1) INTO tbl2 AS newfld FROM tbl1"

    myfunc is a UDF like this:

    Public Function myfunc(abcd as string)
    If abcd="a" Then myfunc="1" ELSE myfunc="0"
    END Function


    i put the UDF in a module,but i get a error undefined function in sql err=3085

    how can i avoid the error?

    Thanks!

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Which database are you using ?

  3. #3
    Join Date
    May 2002
    Posts
    4

    microsoft access ,sql server

    microsoft access ,sql server

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •