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