Hello,
i try to make an SQL query via odbc to an sap db.
Theres two problems at the moment:
Prob. 1: username/password
if i use
con.ConnectTo source
i am asked for username and password and i do get access to the result set.
if i use
con.ConnectTo source, user, password
i get an “invalid username/password” from the odbc driver.
Prob. 2: result set
I use a comples query to get my data:
SELECT a.Buchungszeit, b.terminaltext, c.name from buchung a, mitarbeiter b, buchungsart c where (a.id = b.id)
The SQL syntax is tested in SQL Studio. I also get an result set in notes. But i can only access the first column. Column 2 and column 3 hav a name, i can see with
For i = 1 To result.NumColumns
msg = msg & Chr(10) & i & " " & Result.FieldName(i)
Next
But accessing columns 2 and 3 always returns “False” as result. It does not make a difference if i use the column name or number to reference it.
Well, very specific questions but can someone help me to find a solution?
Regards
G.