ms access to mysql HELP!

hi, i need some help on this... i need to upload my ms access database to a web server which has a mysql database from my local computer at runtime with visual basic! is this possible? and how? source code would be very welcome

thanks in advance
paulmccartneyjrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndySulzCommented:
Are you trying to convert your Access DB to a MySQL DB?
0
AndySulzCommented:
Are you trying to convert your Access DB to a MySQL DB?
0
paulmccartneyjrAuthor Commented:
yes im trying to do that...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

paulmccartneyjrAuthor Commented:
and upload the new mysql database to the web server
0
AndySulzCommented:
   Dim db As Database
    Dim rs As Recordset
   
    Set db = OpenDatabase(App.Path & "\db1.mdb")
    Set rs = db.OpenRecordset("Select * from tblCompanies")

    rs.MoveFirst
    While Not rs.EOF
        Convert_tblCompanies rs("CompaniesID        rs.MoveNext
    Wend
   
    rs.Close
    db.Close
0
AndySulzCommented:
Public Function Convert_tblCompanies(CompanyID As Long)
    Set adodataconn = New ADODB.Connection
    adodataconn.CursorLocation = adUseClient
    adodataconn.Open "Driver={MySQL ODBC 3.51 Driver};Server=server;Port=3306;Option=132072;Stmt=;Database=DB", "Username", "password"
    Set rsrecordset = New ADODB.Recordset
    rsrecordset.CursorType = adOpenStatic
    rsrecordset.CursorLocation = adUseClient
    rsrecordset.LockType = adLockPessimistic
    rsrecordset.Source = "Select * From tblCompanies Where CompanyID = NULL"
    rsrecordset.ActiveConnection = adodataconn
    rsrecordset.Open
   
    rsrecordset.AddNew
    rsrecordset("CompanyID") = CompanyID
    rsrecordset.Update
   
    rsrecordset.Close
    adodataconn.Close
end function
0
AndySulzCommented:
change the Server=server to =YourMySQLDBServerIP  make sure you have the required access to the db.
0
AndySulzCommented:
change Convert_tblCompanies rs("CompaniesID        rs.MoveNext

to:
Convert_tblCompanies rs("CompaniesID")
        rs.MoveNext



This is just sample code, you have to change the field names to match your data.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paulmccartneyjrAuthor Commented:
thank you man! thats just what i needed and worked perfeclty fine.

thanks again
0
AndySulzCommented:
thanks for the 'A'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.