LC Errors/Issues and Resolutions

Mindwatering Incorporated

Author: Tripp W Black

Created: 09/03/2005 at 02:09 PM

 

Category:
Notes Developer Tips
LSX (LotusScript Extensions/Connectors)

CONNECTION ISSUES

Issue:
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application... Connector 'odbc2', Method -Connect- (119)

Resolution:
1. You have a 64bit component and a 32 bit component. For the database and Domino or the Notes client.

Details:
If you are running 32-bit IBM Domino on 64-bit MS Windows and 32-bit database, then you need to use the ODBC control panel:
%systemdrive%\Windows\SysWOW64\odbcad32.exe

If you are running 64-bit IBM Domino on 64-bit MS Windows, then make sure you are using a 64-bit database/client and the 64-bit ODBC panel:
%systemdrive%\Windows\System32\odbcad32.exe
(Yes. It's named wrong twice in this path. Yes, it is "supposed" to be that way. You can check the KB 2721825 MS doc for more details on their 'er thinking on it. )

______________________________

Issue:
[Microsoft][ODBC Driver Manager] Data source name cannot be found and no default driver specified. Connector 'odbc2', Method -Connect- (91)

Resolutions:
1. You set up the wrong ODBC control panel. The drivers (e.g. Access) are missing.
or
2. You installed 64-bit drivers but Domino is 32-bit, or you installed 32-bit drivers/client software, but Domino is 64-bit. If MS Access, install the correct drivers for the version of MS Access installed (e.g. 32 bit for 2007, or either one for 2010 as Access could be either depending on your MS Office install.)

______________________________

Issue:
[Microsoft][CLI Driver] SQL1032N Could not find file 'C:\Program Files(x86)\IBM\Notes\framework\DNSName.mdb' Connector 'odbc2', Method -Execute- (-1811)

Resolutions:
1. Did you use a User DSN instead of a System DSN?
2. Did you use a System DSN, but the default path is empty. If so populate it with the correct "Default path" in the ODBC advanced properties; but won't likely work. (Goto 3 below.)
3. You are likely using a IBM Notes client instead of IBM Domino server, and you put in the schema/owner with the table name.
(e.g. "Select * from dsnname.tablename" instead of "Select * from tablename".)
4. You may also need to add conn.Metadata = tablename to the connection property if using it with MS Access.

______________________________

Issue:
Invalid data type. Connector 'odbc2', Method -Execute-

If you use 32-bit OS (e.g. XP).you either get success, or you get the a default path issue (like above).
If you change your ODBC to Select/connect to an older Access 2003 or Access 2000 or Access 97 mdb, you don't see this error, it works.
If you create a very simply table, it works.

Resolutions:
1. None

Most likely you have a Access 2007 or higher app, and you've enabled conflict checking, and there are hidden Hexadecimal columns which don't come over as hex strings, but as a special "native" Access datatype. (Similar to @Text(@DocumentUniqueID) without the @Text.) As of 2015/11, MW has a PMR open on this issue. We are awaiting a SPR and hopefully a workaround, that doesn't involve a manual process of importing each table into Excel and saving out CSV files for import.

______________________________

Issue:
[IBM][CLI Driver] SQL1032N No start database manager command was issued. SQLSTATE=57019, Connector 'db2', Method -Connect- (-1032)

Resolutions:
1. Check the DB2 server and the DB2 Manager. Make sure both services are running.
2. Check that DECS is running.

______________________________

Issue:
[IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=S1009, Connector 'db2', Method -Connect- (0xFFFE7961)

Resolution:
Check that the database name is correct -- this is set up at the native client level. If using 'odbc' instead of 'db2', set up a system connection in the "Data Sources (ODBC)" control panel.

______________________________

Issue:
[IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001, Connector 'db2', Method -Connect- (-30082)

Resolution:
The username/id or password entered is not correct.

______________________________

Issue:
LCConnection line fails with message: Cannot load connector library 'odbc'.

In addition, you may see the following error message on the server:
db2nq.exe - unable to locate DLL
The dynamic link library nxmlpar.dll could not be found in the specified path.

Resolutions:
1. Add the Domino executable directory to the environmental Path variable.
2. Check the driver, if using 6.x or 7.x, it's 'odbc2' !

______________________________

Issue:
LCConnection line fails with message: Cannot load connector library 'odbc2'.

Resolutions:
1. Check that the appropriate DLLs exist and that DECS is running.
2. Check how the LCSession & LCConnection is being initialized: For non-LEI, session should be dimmed without parameter and connection should reference source database.
3. Run LCTest or for Domino 7, run DCTEST.EXE (Linux/UNIX) or NDCTEST.EXE (Windows)
4. Check that the connector is spelled correctly.

______________________________

Issue:
Error: [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL5016 - Qualified object name TABLENAME not valid., Connector 'odbc2', Method -Execute-(5106)

Resolution:
Evidently this has to do with the system delimiter between the library and file. Instead of it being the standard SQL ".", the system is expecting a "/".
Either change the "." to "/" or see if you can change the session attributes to switch from *SYS to *SQL.

______________________________

Issue:
Error: Metadata object does not exist, Connector 'odbc2', Method -Execute-

Resolution:
Check the SQL you are executing. The table is misspelled or the library/schema has been out.
(e.g. mytable.tablename instead of just tablename)

______________________________

Issue:
Error: [Microsoft][ODBC Driver Manager] Invalid argument value, Connector 'odbc2', Method -Fetch- (55)

Resolution:
Issue seen a couple times using the generic ODBC or DB2 ODBC rather than the Lotus OEM DataDirect ODBC drivers. Try using the DataDirect ones. Get them via Lotus Passport.

______________________________

Issue:
Error: [Microsoft][ODBC Microsoft Access Driver]Invalid character value for cast specification (null), Connector 'odbc2', Method -Update- (39), on line 114

Resolution:
In this case, we thought that one of the documents which didn't have a value was causing the error having a "" null value. However, it was actually that the datatype should have been DateTime instead of Text for the LCField.

______________________________

Issue:
Error: [Microsoft][ODBC Driver Manager] COUNT field incorrect, Connector 'odbc2', Method -Insert- (17)

Resolution:
In this case, we were using the same LCFieldList for both update and insert. However, insert doesn't update the key, so our count was evidently too high. We removed the key and it worked.

______________________________

Issue:
Error: [Microsoft][ODBC Driver Manager] Data overflow in field 'Voltage_Code', Connector 'odbc2', Method -Insert-

Resolution:
The MS documentation instructs to cast the data in the correct format for number, text, date. eg 1, '10', dt 2018-11-12. However, with the MS ODBC driver don't do that. The LCField set of datatype does that already. Just pass the data within the quotes and leave off the dt or ts prefix for dates.
Number 10 --> 10
Text "string" --> string
Text "10" --> 10

______________________________

Issue:
The following Lotus Connector error has occurred:Error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 5., Connector 'odbc2', Method -Execute- (-3010)

Resolution:
Issue was related to working around dashes being used in field/column names. The old technique was to cast the columns to "safe" names, like this:
SELECT BB_Number, BB_Name, Updated, BB_Number_New, Square, Round, Width-F, Height-F, Depth-F, Width-S, Height-S, Depth-S, s_Generation FROM BackBox

This was no longer working in the newer MS ODBC driver for Access. Instead, we used the syntax we use for the IBM direct of simply making them safe with square brackets like so:
SELECT BB_Number, BB_Name, Updated, BB_Number_New, Square, Round, [Width-F], [Height-F], [Depth-F], [Width-S], [Height-S], [Depth-S], s_Generation from BackBox.

______________________________

Issue:
Error: Field mapping failed due to a missing field, Connector 'odbc2', Method -Update-

Resolution:
Check spelling and capitalization of field names. Fields names can be case sensitive with ODBC.

______________________________

Issue:
ndtest.exe works to connect to db2. However, no connections in DECS Administrator and no DCRs can be created.
The former gives the missing libraries error. The latter gives standard realtime services error. DECS is running.

Resolution:
If Linux, this would normally be a permissions/profile issue where the profile of the domino user (e.g. home/notes/.profile) needs to be updated.

If Windows, the server runs as "Local Service". It doesn't login. However, if the DB2 Client (Configuration Assistant) can see the DB2 database/table and the NDTest can, as well. Check the following:
--> Ensure Domino path and the DB2 Connector are in the environmental PATH variable. (My Computer,--> Performance Settings --> Environmental Variables --> PATH)
--> Verify connector is patched. (Don't let the connector get too far behind the server version level.)

______________________________


DATA/FIELDS ISSUES

Issue:
Invalid field

Resolution:
A source database column does not exist in the source database. Check spelling on the key and data columns in the source table/view.
Columns in SQL databases are NOT usually case sensitive, but I've seen cases w/SQL and mySQL where there ARE CASE SENSITIVE.

______________________________


Issue:
"You cannot modify the replication system object 's_Generation'"

Resolution:
This database is an older MDB that has replication enabled. You cannot sync / update these system, not data, "fields"/columns in the table.


______________________________

Issue:
"operation cannot be performed on a fieldlist with no fields"

Resolution:
You didn't add any LCFields to your LCFieldList object. Or you are running more than one LCConnection and LCFieldList and you accidentally specified the wrong list.

You want the following structure/order for your LCFieldList use:
Dim custFldLst As LCFieldList
Dim cID as LCField
Dim cName as LCField
...
Set custFldLst = New LCFieldList
...
If (LCConn.Execute (importquery, custFldLst) = 0 ) Then
' no records fetched / matched search query
Print |No records returned for query: " & importquery & "."
' abort
Exit Sub
End If
' set field mappings
Set cID = custFldLst.Lookup("ID")
Set cName = custFldLst.Lookup("Name")
' process the fetched records
While (LCConn.Fetch (custFldLst) > 0 )
...
Wend

______________________________


Issue:
Field Count Mismatch calling Fetch on a FieldList

Resolution #1
- Use a separate LCConnection for each table (Same LSXSession object - only need one).

Resolution #2
- Play with the Fetch Parameters. In one case I had to populate the parameters rather than leaving them default.

Resolution #3
- You really do have different number of fields between your Select and your field mappings. This has not YET been a problem if I don't utilize all the fields/columns in the Select statement, but it does matter if I have more than in my select used.

Sample Code:

Dim LCS as New LCSession
Dim LCConn as LCConnection
Dim LCConn2 as LCConnection
Dim queryselectstr as String
Dim querycustselectstr as String
...
queryselectstr = |SELECT * FROM MasterWidgetTable|
...
Set LCConn = New LCConnection(importconntype)
Set LCConn2 = New LCConnection(importconntype)
...
If Not (importsvr="") Then
' use server field in profile
LCConn.Server = importsvr
End If
If Not (importsvr="") Then
' use server field in profile
LCConn2.Server = importsvr
End If
If (importconntype="oledb") Then
' use server field in profile
LCConn.Provider = "SQLOLEDB"
End If
If (importconntype="oledb") Then
' use server field in profile
LCConn2.Server = "SQLOLEDB"
End If
LCConn.Userid = importid
LCConn2.Userid = importid
LCConn.Password = importpwd
LCConn2.Password = importpwd
LCConn.Database = importdb
LCConn2.Database = importdb
LCS.ClearStatus
LCConn.MapByName = True
LCConn2.MapByName = True
LCConn.Connect
If Not (LCConn.IsConnected) Then
Print |Unable to connect to | & importdb & | using credentials. |
Exit Sub
End If
Print |Connection Status: | & LCS.GetStatusText(LCS.GetStatus) & |.|
LCConn2.Connect
If Not (LCConn2.IsConnected) Then
Print |Unable to connect to | & importdb & | using credentials. |
Exit Sub
End If
Print |Connection Status: | & LCS.GetStatusText(LCS.GetStatus) & |.|
' set FieldLists
Set fldLst = New LCFieldList
' execute queries
If (LCConn.Execute(importquerystr, FldLst) = 0) Then
' no records fetched
Print | No records returned from master table, MasterWidgetTable. Nothing to do.|
Exit Sub
End If
' set fields in fieldlist
Set mID = fldLst.Lookup("ID")
...

While (LCConn.Fetch (fldLst) > 0 )
...
mid = mID.Text(0)
querycustselectstr = |SELECT ID,CustName,CustAddr1,CustAddr2,CustCity,CustState,CustZip,CustPhone,CustEmail,CustFax FROM Customers WHERE ID='111'|
...
Set custFldLst = New LCFieldList
If (LCConn2.Execute(querycustselectstr , custFldLst) = 0) Then
' no records fetched
Print | No records returned from customer table, Customers. Nothing to do.|
Exit Sub
End If
' set fields in fieldlists
Set cCustName = custFldLst.Lookup("CustName")
...
While (LCConn2.Fetch (custFldLst, 1, 1) > 0) ' 1,1 limits records returned - in this case, there is one customer record for all widgets purchased by that customer
' get customer data for current record
...
...
Wend
...
Wend

' kill objects
Set fldLst = Nothing
LCConn2.Disconnect
Set LCConn2 = Nothing
LCConn.Disconnect
Set LCConn = Nothing


______________________________




previous page