@DBCommand(ODBC) Errors

I’m sure my problem has to do with how Notes caches things, but for the live of me, I can’t figure it out.

Here is the situation. I have a form that incorporates multiple lookups using @DBCommand(ODBC version). All of the lookups except one are accessing the same Oracle server. When I run the form, if I use one of the lookups access server A, the lookup accessing server B will produce the following error: “Could not execute @DB function”.

Here is a sample of the @DBCommand code I am using:

username:=@GetProfileField(“Profile”;“ServerA_AccountName”);

password:=@GetProfileField(“Profile”;“ServerA_OraclePassword”);

command_string:=“SELECT Distinct facility_tx FROM tstar_facility_group_user”;

@DbCommand(“ODBC”:“NoCache”;“DataSourceA”; username; password; command_string )

And,

username:=@GetProfileField(“Profile”;“ServerB_AccountName”);

password:=@GetProfileField(“Profile”;“ServerB_OraclePassword”);

command_string:=“SELECT Distinct Security_cd FROM VSecurity_cd”;

@DbCommand(“ODBC”:“NoCache”;“DataSourceB”; username; password; command_string )

Is there something I’m missing somewhere? Is there a command to disconnect between lookups?

Any help would be greatly appreciated.

Thanks,

MJ

Subject: @DBCommand(ODBC) Errors

Have you used the @DbCommand(“ODBC” …) before? I mean, did you used it in another application and it worked well? Because, by what you said, it looks like it can’t activate the appropriate driver as it couldn’t has been provided the right way.

That’s a guess.

-Gabriel

Subject: RE: @DBCommand(ODBC) Errors

This is the first time I have tried @DBCommand to acccess ODBC data. I have used the same datasources with Lotuscript many times.

MJ

Subject: RE: @DBCommand(ODBC) Errors

Through ‘regedit’ (if you’re running Windows), could check whether ‘HKEY_CURRENT_USER\Software\ODBC\ODBC.INI’ has the information needed to load the driver you want to use to access the data source?

Subject: Resolved: @DBCommand(ODBC) Errors

I found the problem. DatasourceA was using the Oracle10g driver and DatasourceB was using an earlier driver. Once I set them to use the same driver, it worked as anticipated.

Thanks for the help.

MJ

Subject: RE: Resolved: @DBCommand(ODBC) Errors

It was smelling driver problem… :slight_smile:

Glad if I could help somehow.

-Gabriel.

Subject: RE: @DBCommand(ODBC) Errors

Oh, forgot to say that the same happens if serverB is accessed first and ServerA accessed second. It’s like whoever gets the first connection won’t let another connection happen.

MJ