473,399 Members | 2,278 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,399 software developers and data experts.

VB - Oracle multiple table connection

Hi everyone,
im developing one application for banking. there i have stucked wit one prob.
now prob is tat im not able to access multiple tables at a time through vb.
my coding is as below

Dim rs_cust As Recordset
Dim cn_cust As Connection
Dim rs_acco As Recordset
Dim cn_acco As Connection
Dim rs_tran As Recordset
Dim cn_tran As Connection
Dim db, table, msg, sql, login, pass As String
Private Sub Command2_Click()
Form1.Enabled = True
Unload Me
End Sub

Private Sub Form_Load()
db = "banking"
login = "system"
pass = "manager"
table = "customer"
Set rs_cust = New Recordset
Set cn_cust = New Connection
cn_cust.Open "Provider=OraOLEDB.Oracle.1;" & "Password=" & pass & ";User ID=" & login & ";Data Source=" & db & ";Persist Security Info=True"
cn_cust.CursorLocation = adUseClient
ss = "select * from customer"
Set rs_cust = New ADODB.Recordset
'rs_cust.Open ss, cn, adOpenDynamic, adLockOptimistic


db = "banking"
login = "system"
pass = "manager"
table = "account"
Set rs_acco = New Recordset
Set cn_acco = New Connection
cn_acco.Open "Provider=OraOLEDB.Oracle.1;" & "Password=" & pass & ";User ID=" & login & ";Data Source=" & db & ";Persist Security Info=True"
cn_acco.CursorLocation = adUseClient
ss = "select * from account"
Set rs_acco = New ADODB.Recordset
'rs_acco.Open ss, cn, adOpenDynamic, adLockOptimistic

db = "banking"
login = "system"
pass = "manager"
table = "transection"
Set rs_tran = New Recordset
Set cn_tran = New Connection
cn_tran.Open "Provider=OraOLEDB.Oracle.1;" & "Password=" & pass & ";User ID=" & login & ";Data Source=" & db & ";Persist Security Info=True"
cn_tran.CursorLocation = adUseClient
ss = "select * from transection"
Set rs_tran = New ADODB.Recordset
'rs_tran.Open ss, cn, adOpenDynamic, adLockOptimistic
End Sub

im using oracle as back end. any my connection type is ado.
i have included all required preference files.
im able to connect wit onlyone table.
I want to use three tables at a time customer, account and transection.
thanks
Sep 16 '09 #1
0 1862

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

Similar topics

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,...
4
by: Ellen K. | last post by:
Hi all, Being that so far I didn't get an answer to my below problem on the Oracle newsgroup, I figured it couldn't hurt to try here. While at my current job I've been working with mostly SQL...
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...
9
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to...
1
by: Hai Ly Hoang \(MT00KSTN\) | last post by:
Hi, I'm an Oracle newbie. I've just created a table in Oracle with CREATE TABLE. Now, in C#, how to connect to database and get my table ? Thanks
6
by: BillCo | last post by:
I've reached the limit of my knowledge here and I'm starting to go mad - any help would be greatfully recieved!!!! I'm having a strange problem with making pass through queries to an oracle db...
2
by: rcc.gamer | last post by:
Hello All, I am trying to connect a GridView to an Oracle table using the standard SqlDataSource. The process is fairly simple and there are detailed instructions from Microsoft ......
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g. Please help, I'm trying to write an ASP page to use ADO to run a long query against an Oracle 10g database, to create tables,...
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:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.