Running on: Windows 2000
DBMS: Oracle 8.1 (client)
Using: PB/CC 4.03 , relevant code below
Symptoms: Program starts Ok, creates the oConn Connection object OK, Open method fails.
Open method failure returns nothing for the error description (error count = 0) .
Other systems:
Same executable runs perfectly on
Windows XP/Pro SP2 and Windows/XP SP3 with Oracle 10g
Windows XP/Pro SP2 with Oracle 8.1
On these systems when the connection string is deliberately cheesed up to induce an error, the error message when oConn.Open fails is returned, eg:
Suspect: Target system does not have adequate level of ADO installed. The only "tlb" files I can find on target system are with names msado15.tlb, msado20.tlb and msado21.tlb
Questions
1. Does this sound like my suspicions are correct, that an insufficient level of ADO is installed?
2. Is it safe to install ADO 2.8 on target system (there are no other applications on this system using ADO). MS says the redistributable may be installed on Windows/2000. Reference:
3. Can multiple levels of ADO exist on same system? If not, is ADO "backward compatible?", that is, does each new release of ADO support all the properties and methods supported by prior versions?
4. How should one determine which version(s) of ADO are installed on a system?
Any/all suggestions appreciated
Thanks,
MCM
#INCLUDE Library file in use (created by someone else):
Relevant Source code
DBMS: Oracle 8.1 (client)
Using: PB/CC 4.03 , relevant code below
Symptoms: Program starts Ok, creates the oConn Connection object OK, Open method fails.
Open method failure returns nothing for the error description (error count = 0) .
Other systems:
Same executable runs perfectly on
Windows XP/Pro SP2 and Windows/XP SP3 with Oracle 10g
Windows XP/Pro SP2 with Oracle 8.1
On these systems when the connection string is deliberately cheesed up to induce an error, the error message when oConn.Open fails is returned, eg:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor [invalid Data Source (DB) name]
or
ORA-01017: invalid username/password; logon denied [um, self-evident]
or
ORA-01017: invalid username/password; logon denied [um, self-evident]
Questions
1. Does this sound like my suspicions are correct, that an insufficient level of ADO is installed?
2. Is it safe to install ADO 2.8 on target system (there are no other applications on this system using ADO). MS says the redistributable may be installed on Windows/2000. Reference:
3. Can multiple levels of ADO exist on same system? If not, is ADO "backward compatible?", that is, does each new release of ADO support all the properties and methods supported by prior versions?
4. How should one determine which version(s) of ADO are installed on a system?
Any/all suggestions appreciated
Thanks,
MCM
#INCLUDE Library file in use (created by someone else):
Code:
' ------------------------------------------------------------ ' Library Name: Microsoft ActiveX Data Objects 2.5 Library ' Library File: C:\Program Files\Common Files\system\ado\msado25.tlb ' ------------------------------------------------------------ ' Version Info: ' ------------- ' Company Name: Microsoft Corporation ' File Description: Microsoft Data Access - ActiveX Data Objects 2.5 Type Library ' File Version: 2.81.1117.0 (xpsp_sp2_rtm.040803-2158) ' Internal Name: msado25.rc ' Legal Copyright: © Microsoft Corporation. All rights reserved. ' Original Filename: msado25.rc ' Product Name: Microsoft Data Access Components ' Product Version: 2.81.1117.0 ' ------------------------------------------------------------ ' ProgID: ADODB.Command.2.8 ' Interface Name: ADODBCommand ' ' ProgID: ADODB.Connection.2.8 ' Interface Name: ADODBConnection ' ' ProgID: ADODB.Parameter.2.8 ' Interface Name: ADODBParameter ' ' ProgID: ADODB.Record.2.8 ' Interface Name: ADODBRecord ' ' ProgID: ADODB.Recordset.2.8 ' Interface Name: ADODBRecordset ' ' ProgID: ADODB.Stream.2.8 ' Interface Name: ADODBStream ' ' Interface Prefix: ADODB '$PROGID_ADODBCommand28 = "ADODB.Command.2.8" '$PROGID_ADODBConnection28 = "ADODB.Connection.2.8" '$PROGID_ADODBParameter28 = "ADODB.Parameter.2.8" '$PROGID_ADODBRecord28 = "ADODB.Record.2.8" '$PROGID_ADODBRecordset28 = "ADODB.Recordset.2.8" '$PROGID_ADODBStream28 = "ADODB.Stream.2.8" ' versionless created 8/29/08 by MCM $PROGID_ADODBCommand28 = "ADODB.Command" $PROGID_ADODBConnection28 = "ADODB.Connection" $PROGID_ADODBParameter28 = "ADODB.Parameter" $PROGID_ADODBRecord28 = "ADODB.Record" $PROGID_ADODBRecordset28 = "ADODB.Recordset" $PROGID_ADODBStream28 = "ADODB.Stream"
Relevant Source code
Code:
FUNCTION SelectTesterFunction (sConnect AS STRING, sQuery AS STRING, sResultFile AS STRING) AS LONG LOCAL oConn AS ADODBConnection LOCAL vConn AS VARIANT ' connection string so I can try multiple LOCAL vState AS VARIANT LOCAL vProvider AS VARIANT ' get after connection ' to create a recordset on the connnection LOCAL oRs AS ADODBRecordset LOCAL oFields AS ADODBFields, vFields AS VARIANT LOCAL oField AS ADODBField, vField AS VARIANT LOCAL vSql AS VARIANT, vnRow AS VARIANT LOCAL vW AS VARIANT ' working var LOCAL nCol AS LONG, iCol AS LONG LOCAL sColName() AS STRING LOCAL vColIndex AS VARIANT, vColName AS VARIANT LOCAL vEOF AS VARIANT LOCAL vItem AS VARIANT LOCAL nRow AS LONG LOCAL vValue AS VARIANT LOCAL sValue AS STRING LOCAL hOut AS LONG, sBUff AS STRING LOCAL iRet AS LONG LOCAL vErrIndex AS VARIANT LOCAL vErrDesc AS VARIANT LOCAL vErrCount AS VARIANT LOCAL nErr AS LONG LOCAL iErr AS LONG hOut = FREEFILE OPEN sResultFile FOR OUTPUT AS hOut PRINT #hOut, "ADO TESTING " & DATE$ & $SPC & TIME$ PRINT #hOut, PRINT #hout, USING$("COnnection:&", sConnect) PRINT #hout, USING$("Query:&", sQuery) STDOUT USING$("COnnection:&", sConnect) STDOUT USING$("Query:&", sQuery) PRINT #hOut, SET oConn = NEW ADODBConnection IN "ADODB.Connection" IF ISOBJECT(oConn) THEN STDOUT "created ADODBConnectionObject OK, setting connection string to:" STDOUT sConnect 'vConn = "Provider=OraOLEDB.Oracle;Data Source=XE;User ID=HR;Password=hrpass" vConn = sConnect OBJECT CALL oConn.Open (vConn) iRet = OBJRESULT ' most recent IF iRet <> %S_OK THEN ' for STDOUT "Object error on oConn.Open" OBJECT GET oconn.Errors.Count TO vErrCount nErr = VARIANT#(vErrCount) STDOUT "Error Count is " & FORMAT$(nErr) '<<< Returns count of zero here on problem system FOR iErr = 0 TO nErr-1 STDOUT "Getting Error index " & FORMAT$(iErr) PRINT #hOut, "Getting Error index " & FORMAT$(iErr) vErrIndex = iErr OBJECT GET oConn.Errors.Item(vErrIndex).Description TO vErrDesc PRINT #hOut, "ErrorMessage:" & VARIANT$(vErrDesc) STDOUT "Error Message:" & VARIANT$(vErrDesc) NEXT GOTO TesterExit END IF .....
Comment