tina20 Posted June 30, 2009 Share Posted June 30, 2009 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??? Quote Link to comment https://forums.phpfreaks.com/topic/164248-interaction-between-mysql-and-sql-database/ Share on other sites More sharing options...
rhodesa Posted June 30, 2009 Share Posted June 30, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/164248-interaction-between-mysql-and-sql-database/#findComment-866407 Share on other sites More sharing options...
tina20 Posted June 30, 2009 Author Share Posted June 30, 2009 hey buddy, thnx for ur precious post. Well let me give it a try....i'm a newbie to php ...plzz guide me if i'm unable to make the conenction via adodb.Tk Care Regards, tina Quote Link to comment https://forums.phpfreaks.com/topic/164248-interaction-between-mysql-and-sql-database/#findComment-866450 Share on other sites More sharing options...
rhodesa Posted June 30, 2009 Share Posted June 30, 2009 ADODB can get complicated. start with something simple, just selecting out of a MySQL DB. While the documentation is thorough, it's not very intuitive. Quote Link to comment https://forums.phpfreaks.com/topic/164248-interaction-between-mysql-and-sql-database/#findComment-866466 Share on other sites More sharing options...
gassaz Posted June 30, 2009 Share Posted June 30, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/164248-interaction-between-mysql-and-sql-database/#findComment-866548 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.