ODBC again

One more try with the forum. Otherwise I may try actual notes support…

So…I can’t get it to work…even in ones that worked before.

I have set SIEBELTEST up as a SYSTEM Datasource on my PC. (Unless I need it on the server?)

On my mailfile on the server I created a draft email message…

It has inside it some buttons, (create hotspot - button).

Inside the buttons I have some code (these were my examples for other people, and they were DEFINATELY 100% working before):

@DbLookup( “ODBC” : “NoCache” ; “SIEBELTEST” ; “USERNAME”; “PASSWORD”; “TABLE” ; “COLUMN” : “fail” ; “NAME” ; “Name of Record” ; “” : “Ascending” )

This gives the result:

Could not execute db function

@DbColumn(“OBDC”:“NoCache”;“SIEBELTEST”;“USERNAME”;“PASSWORD”;“TABLE”;“COLUMN”)

This gives the result:

The neccesary external database driver cannot be located

  1. @DbCommand( “ODBC” : “NoCache” ; “SIEBELTEST” ; “USERNAME” ; “PASSWORD”;

“SELECT NAME FROM dbo.TABLE WHERE NAME LIKE ‘A%’”: “fail”)

This gives the result:

Could not execute db function

I am using either a definately working system login (I can login to SQL server using it), or my login which definately works (I can login to SQL Server with it).

My Datasource is definately defined as a System DSN.

I cannot even connect to the standard MSSQL database called “pubs” (if someone can connect to this from notes please provide example how)…

Nothing ever works…always the above errors are occouring…this can’t be right…

I can successfully test the ODBC datasources all test OK.

Any ideas?

Subject: ODBC again

Its pretty difficult to troubleshoot when you have such limited debugging messages to go on. Have you set up a LS script to attempt your ODBC connection? I have only ever tried ODBC through LS, so I don’t think I would be much use in this situation. Try the following (just wrote this off the cuff rather than copy/pasting, so doublecheck the syntax):

dim con as New ODBCConnection

dim status as Boolean

status = con.ConnectTo(DSN, ID, PWD)

if status then

msgbox “success”

else

msgbox con.GetErrorMessage(con.GetError)

msgbox con.GetExtendedErrorMessage(con.GetError)

end if

That might give you a little more information.

Subject: RE: ODBC again

Hi, I know this was development code but it currently gives an error like:Illegal Parenthesised reference GetExtendedErrorMessage…

But…do you have a ls example, I would be delighted to get it working anyhow…ls or formula I don’t mind…

Subject: RE: ODBC again

I’m not at a location where I can test this code but try changing how the error is reported, like this:

dim con as New ODBCConnection

dim status as Boolean

dim DSN as String

dim ID as String

dim PWD as String

DSN = “”

ID = “”

PWD = “”

status = con.ConnectTo(DSN, ID, PWD)

if status then

msgbox “success”

else

Messagebox con.GetExtendedErrorMessage,con.GetErrorMessage

end if

Subject: RE: ODBC again

Hi, that gives an error saying:“LS:DO - ODBC could not complete the requested operation”

[Microsoft][ODBC Driver Manager] Driver does not support this function.

Subject: RE: ODBC again

Does your local computer have a connection to the ODBC data source? Can you, for example, connect to it through Excel?

Or if this is in a server agent, does your server have a connection to the data source?

This does not seem to be a problem with your code either Formula or LS - this seems to be a driver/connection issue.

Subject: RE: ODBC again

Hi,I can connect to for example the Pubs database on the same server using Excel.

But can’t connect via notes. I have an open support call with IBM regarding, I’ll let you know if I find something useful.

Regards,

Andrew

Subject: RE: ODBC again

Hello Andrew,

I am bit curious if the problem got resolved. I am getting same kind of problem. Please let me know what solution you have got.

This is the error I am getting.

(720: LS:DO- ODBC could not complete the requested operation.)

Regards,

Anto