473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

VB Oracle Connection Data Retrieval

I have a VB 6 application to connect to a Oracle database using ADO Connection. It works fine with Access. But when I try with my Oracle Database it does not retrieve any data. It can only show the Structure of the Tables. But no. of Rows is always 0. I have used Datagrid but only column names are displayed. Please help me. Its urgent for my exam also I m New to VB. The Connection Codes are given Below.

Option Explicit
Public conn As ADODB.Connection
Public rsUserAccount As ADODB.Recordset


Public Sub Connection()

'The Purpose of this function is to open a connection to link the database

Set conn = New ADODB.Connection

'conn.ConnectionString = "USER ID=scott;PASSWORD=tiger"
'conn.Provider = "MSDAORA.1"

conn.ConnectionString = "UID=scott;PWD=tiger;DRIVER={Microsoft ODBC for Oracle};" _
& "SERVER=Ora9iDBS;"


conn.Open

End Sub

Public Sub User_Account()

'The Purpose of this function is to open the recordset "User_Account"

Set rsUserAccount = New ADODB.Recordset

With rsUserAccount
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.ActiveConnection = conn
.Source = "Select * from UserAccount"
.CursorLocation = adUseClient
.Open
End With

End Sub

Thanks in advance. bye
Dec 2 '08 #1
1 4353
debasisdas
8,127 Expert 4TB
Please change the name of the function . Connection is a predefined object of ADODB .
Dec 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: pleake | last post by:
Following is a logon.asp script. This script works when IIS is reset each day. The epapi object is a vendor api program I do not have the code for! The logon process involves three servers: ...
2
by: Bob | last post by:
x-no-archive:yes Installing Oracle 9i client v9.2.00.00 on w2k pro wrkstn which is member of AD Domain. When testing connection - getting error: Unable to connect SQLState=S1000 ORA-12638: ...
0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
11
by: Rosco | last post by:
Does anyone have a good URL or info whre Oracle and Access are compared to one another in performance, security, cost etc. Before you jump on me I know Oracle is a Cadillac compared to Access the...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
0
by: rubinamunir | last post by:
hello every body i am going to make a connection Oracle through php i am facing thi serror please help me where is problem lies. S1000: ORA-12638: Credential retrieval failed thanks
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
2
by: Luting | last post by:
Hi, Is it possible to update oracle via Access forms? I am thinking maybe I could make a link table connnected with oracle database. And the form could be based on the link table. Does this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.