-
Sep 24th, 2004, 06:44 PM
#1
MySQL adding error [Resolved]
I connect to a remote MySQL database. But sometimes when I go to add a new record, i get this error :
ERROR : -2147217887
Multiple-step operation generated errors. Check each status value.
Any ideas? What I do when I connect to the DB is :
VB Code:
With Rs
.AddNew 'adding new record
.Fields("Username") = sUsername
.Fields("Password") = sPassword
.Update 'this updates the recordset etc.
End With
Thanks
Last edited by manavo11; Oct 4th, 2004 at 06:32 AM.
Has someone helped you? Then you can Rate their helpful post.
-
Sep 24th, 2004, 07:13 PM
#2
-
Sep 24th, 2004, 09:50 PM
#3
-
Sep 26th, 2004, 05:19 AM
#4
-
Sep 30th, 2004, 05:18 PM
#5
-
Oct 1st, 2004, 07:21 AM
#6
Addicted Member
Can you post FULL code. Modify your personal info out tho.
Live to love, Not to hate
-
Oct 1st, 2004, 07:43 AM
#7
Addicted Member
ok this works using VBMySQLDirect its easy to use. But you must distribute the dll's with the program. Here is the site link:
Download Page
Home Page
Code:
Dim pCnn As MYSQL_CONNECTION
Dim pRs As MYSQL_RS
Set pCnn = New MYSQL_CONNECTION
' User/pass that connect to mysql
pCnn.OpenConnection "127.0.0.1", "Username", "Password", "atomsoftweb"
Set pRs = New MYSQL_RS
Dim SQL1 As String
Dim Var As String, Var2 As String, var3 As String
Var = "theUsername" ' This is the username you want to enter into a new record.
Var2 = "ThePassword" ' This is the password encryted.
var3 = Chr(34) & Var & Chr(34) & ", " & Chr(34) & Var2 & Chr(34)
SQL1 = "INSERT into users (username, password) VALUES (" & var3 & ");"
pRs.OpenRs SQL1, pCnn
'Put some error handling here
pCnn.CloseConnection
Set pCnn = Nothing
Live to love, Not to hate
-
Oct 1st, 2004, 07:52 AM
#8
Addicted Member
or if you want try this ok.
Note: pCnn is the connection to mysql ok
Code:
With rs
.OpenRs "select * from users", pCnn
.AddNew 'adding new record
.Fields("Username") = sUsername
.Fields("Password") = sPassword
.Update 'this updates the recordset etc.
End With
Last edited by AtomSoft; Oct 1st, 2004 at 08:48 AM.
Live to love, Not to hate
-
Oct 3rd, 2004, 05:36 PM
#9
-
Oct 4th, 2004, 06:16 AM
#10
Addicted Member
What is your current Connection String ? If you want to be help supply some code. Maybe thats why no one is helping they have yet to see what you got done so far. Even if something is wrong show the code so we can try to help.
Live to love, Not to hate
-
Oct 4th, 2004, 06:32 AM
#11
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|