SQL Problem2

  • 19 years ago

    I have make an DLL File and define an Function into it with name
    Fname(i as string) ,and the file with name Try.Dll
    And i have insert Try.dll in my Project References and it work good...but
    when i insert try.dll in me database file References and create an Query that use Fname function it's do not work and the database can't know this function .....Why????

  • 19 years ago

    As I said in the last one, SQL statements and your VB code are entirely seperate. You can use your function within the VB project that references it, but not in the SQL statement. Therefore, instead of doing
    "SELECT something FROM table WHERE id=myfunction(something)"
    you would do
    "SELECT something FROM table WHERE id=" & myfunction(something)
    -- then VB parses the myfunction part, instead of treating it as string and ignoring it. What exactly are you trying to do??

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Every language has an optimization operator. In C++ that operator is ‘//’”