Solved

Cannot connect to Oracle 9i Server with Oracle 9i Client using Visual Basic ADO's 2.1

Posted on 2004-08-10
7
1,615 Views
Last Modified: 2008-02-01
We are Running into a problem Connecting to the Oracle 9i database with Oracle 9i Client using Visual Basic 6.0 and ADO's.

We have tried the the following drivers and all of them seem to fail at some point or other. Here is a description of the drivers and error messages

MS ODBC for Oracle using Connection String

Unable to Execute StoredProcedures with Paramters using ADO.
Error # 3265:Item cannot be found in the collection corresponding to the requested name or ordinal.

MS ODBC driver for Oracle using DSN with Oracle 9i Client
Unable to Execute StoredProcedures with Paramters using ADO.
Error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512


Oracle in ORAHOME using DSN and ADO
Unable to Execute StoredProcedures with Paramters using ADO.
Throws an error when refresh parameters is called.

Can some body please help!!!!!!!!!!!!!!!!!!!!1

Thanks in advance...
Shubz




0
Comment
Question by:shubz
7 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
Can you post the procedure header/interface: the list of parameters with their datatypes etc?

Have you also tried to install the Oledb provider from Oracle and use that one?
I had good results with that one, better than with the ODBC of microsoft and the one from Oracle.
Basically, I either had Bugs or Bad Performance using ODBC drivers, and switching to OleDB solved those problems.

CHeers

0
 

Expert Comment

by:j79h110
Comment Utility
Humm,

You should try to connect via the "Test Connection" button, in the Oracle ODBC Driver Configuration window.  Please do the following and then let me know what happens:

1.  Open the control panel.
2.  Open the Administrative Tools folder.
3.  Double-click the Data Sources (ODBC)
4.  For ease of use just make a user DSN, left-click the User DSN tab
5.  Left Click the Add button.
6.  Scroll down the list until you see Oracle in OraHome92 <<what ever you named the oracle home to.
7.  Left-click the driver and then left-click the Finish button.
8.  Type "Test" in the source name, whatever the TNS entry is in the TNS Service Name field, and your user id in the User Id field.
9.  Left click the Test Connection button.
10. Enter your password and click ok...
11. If your connection fails here please let me know what the error message is.

Thanks,
JohnsterMonster

PS If you are failing here... it may be a good time to check the client out as well.  Open a cmd prompt and do the following:

c:\>tnsping <<tnsname_entry_goes_here>>
and
c:\>sqlplus /nolog
sql> connect username/password@<<tnsname_entry_goes_here>>

Example:
C:\Documents and Settings\jmharper>tnsping oratst

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 11-AUG-2004 09:14:57

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
C:\oracle\ora92\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oratst)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORATST)))
OK (20 msec)

C:\Documents and Settings\jmharper>

and
C:\Documents and Settings\jmharper>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Aug 11 09:15:39 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect lang_test/abc123@oratst
Connected.
SQL>
0
 

Expert Comment

by:j79h110
Comment Utility
BTW - Your error message is this:

ORA-06512: at stringline string
Cause: Backtrace message as the stack is unwound by unhandled exceptions.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.

Thanks again,
JohnsterMonster
0
 

Author Comment

by:shubz
Comment Utility
I am sorry, but none of the anwers above have resolved my issue. I am very grateful to angelIII {http:#11770268} & j79h110 {http:#11774266}, but i would prefer not to give any points.

Thanks.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
Comment Utility
PAQed - no points refunded (of 100)

GhostMod
Community Support Moderator
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Creating and Managing Databases with phpMyAdmin in cPanel.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now