Click here to Skip to main content
15,922,015 members

Comments by Mykeo (Top 2 by date)

Mykeo 15-Oct-13 13:48pm View    
Deleted
Thanks for your assistance.
I'm using mysql in wampserver not sql server. though i have sql server in my client system.

mysql server is on other machine and i'm accessing it through my application on my machine

when i ping i can see both pcs but my application cannot access the database on the server.

The error is: operation is not allowed when the object is closed.

Please i need help on this. below is the full connection code:




Public con As New ADODB.Connection

Public recPurchase As New ADODB.Recordset
Public recPurchase2 As New ADODB.Recordset
Public recSales As New ADODB.Recordset
Public recUsers As New ADODB.Recordset
Public recItem As New ADODB.Recordset
Public recOrderHistory As New ADODB.Recordset

Public recInvoice As New ADODB.Recordset
Public recInvoice2 As New ADODB.Recordset
Public recInvoice3 As New ADODB.Recordset
Public recInvoice4 As New ADODB.Recordset
Public recInvoice5 As New ADODB.Recordset
Public recInvoice6 As New ADODB.Recordset
Public recInvoice7 As New ADODB.Recordset

Public recWaybill As New ADODB.Recordset
Public recWaybill2 As New ADODB.Recordset
Public recWaybill3 As New ADODB.Recordset
Public recWaybill4 As New ADODB.Recordset
Public recWaybill5 As New ADODB.Recordset
Public recWaybill6 As New ADODB.Recordset
Public recWaybill7 As New ADODB.Recordset

Public recOrder As New ADODB.Recordset
Public recOrder2 As New ADODB.Recordset
Public recOrder3 As New ADODB.Recordset
Public recOrder4 As New ADODB.Recordset
Public recOrder5 As New ADODB.Recordset
Public recOrder6 As New ADODB.Recordset
Public recOrder7 As New ADODB.Recordset
Public recOrder8 As New ADODB.Recordset

Public recReceipt As New ADODB.Recordset
Public recTransaction As New ADODB.Recordset

Public Sub ConnectMe()


On Error Resume Next






con.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};Server=192.168.0.102;Database=furniture1;port=3306;User=root;Password=;Option=3;"
con.Open

con.CursorLocation = adUseServer



'con.Open "provider = microsoft.jet.oledb.4.0;data source = " & App.Path & "http://localhost/test/recordset.php?sql="
recPurchase.Open "Select * from Purchase order by ModelNo", con, adOpenDynamic, adLockOptimistic
recSales.Open "Select * from Sales order by ModelNo", con, adOpenDynamic, adLockOptimistic
recUsers.Open "Select * from Users order by LoginId", con, adOpenDynamic, adLockOptimistic
recOrderHistory.Open "Select * from Order_History order by ModelNo", con, adOpenDynamic, adLockOptimistic
recItem.Open "Select * from Item order by ModelNo", con, adOpenDynamic, adLockOptimistic

recInvoice.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice2.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice3.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice4.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice5.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice6.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic
recInvoice7.Open "Select * from Invoice order by Invoice_No", con, adOpenDynamic, adLockOptimistic

recWaybill.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill2.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill3.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill4.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill5.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill6.Open "Select * from Sales_Order order by S_OrderNo", con, adOpenDynamic, adLockOptimistic
recWaybill7.Open "Select * from Sales_Order order by
Mykeo 11-Oct-13 15:16pm View    
I have same issue and i changed the bind-address in my_ini file(wampserver), it still didn't work. is it because i'm using vb6.0 or what? It works when i use localhost on the laptop where server is installed. Pls, i need your help.