Hi All
I am using the following @Dblookup Query but every time I try to run it, it comes up with the following error.
Invalid @Db function parameter.
If I take out the [PARTIALMATCH] the code runs ok, but I need the [PARTIALMATCH] ability. Am I using the parameter correct?
@DbLookup(“ODBC”; “LINK”; “USERNAME”; “PASSWORD”; “STOCK_CONTROL_FILE”; “ITEM_DESCRIPTION_1”; “ITEM_NUMBER”;code;[PARTIALMATCH])
Regards
Douglas Bell
Subject: @Dblookup Query
[PARTIALMATCH] is only supported for Domino data sources, not ODBC.
johan@kanngard.net
http://dev.kanngard.net
Subject: RE: @Dblookup Query
Hi Johan
Thanks for the response. Do you know of a way that I can achieve the same results as [PARTIALMATCH] while using the ODBC link?
Regards
Douglas Bell
Subject: RE: @Dblookup Query
No, I don’t think it’s possible using @DbLookup. You might want to consider using an ADODB.Connection object:Technical documentation | Microsoft Learn
For example, you can use it like this:
Dom con As Variant
Set con = CreateObject(“ADODB.Connection”)
Call con.open(“TheODBCDatasource”, “TheDBCUserName”, “TheODBCPassword”)
Dim recordSet As Variant
Set recordSet = con.execute(sql)
Dim i As Integer
For i = 0 To recordSet.fields.count - 1
Print recordSet.fields.item(i).name & "=" & recordSet.fields.item(i).value
Next i
johan@kanngard.net
http://dev.kanngard.net