Jump to content

interaction between mysql and sql database


tina20

Recommended Posts

Hi,

I'm using XAMPP package to develop a php site on the intranet level. To be more precise, the PHPMyAdmin tool. The issue is we are developing a solution wherein some modules are in php and others in asp.net.

 

PROBLEM:

 

Two databases are coming into picture namely, mysql from the XAMPP package for running php pages and mssql server 2005 for runing .net pages. I want to retrieve records from the employee master table of sql database and upload it into mysql database. In the same way i want to pass on some records from mysql database to mssql database. Is this ideally possible...If so could you suggest a solution????

NOTE: mysql server uses port 3306... i have no idea about sql 2005. can both run at the same time???

 

Link to comment
Share on other sites

yes, the same server can run both a MySQL and a MSSQL server. also, PHP is definitely capable of reading/writing to both database formats, and I assume the same is true with ASP

 

for PHP, look into a DBM class like ADODB...which wraps all the different types of databases into one set of functions. this way, it shouldn't matter what the backend database is.

Link to comment
Share on other sites

From asp.net to connect to mysql you need the driver... (Mysql.data.dll) you can download it from the mysql page.

 

When you get the driver, you can add a reference to the driver into your asp.net project.

 

Now you can use something like this..

 


            Dim conn As New MySqlConnection(ConnectionString)
            Dim myCommand As New MySqlCommand
            Dim myAdapter As New MySqlDataAdapter
            Dim myData As New DataTable

            myCommand.Connection = conn
            Try
                myCommand.CommandText = sql
                myAdapter.SelectCommand = myCommand
                myAdapter.Fill(myData)

                'here add your code

            Catch myError As MySqlException
                MsgBox(myError.Number & " " & myError.Message)
            Finally
                conn.Close()
            End Try

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.