| | |
can i use mysql database with asp
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
You can. But it would be much easy to use PHP with MySQL, at least there is phpMyAdmin to help with the interface with database. Connecting mySQL in ASP is as follow (change the dbname,username and password to yours):
Since you just want to start learning ASP, it would be better to learn php, if you want to use mySQL. You can easily change to ASP or other server side language in the future as they are very much the same. I learnt ASP at the first place and store data in MS Access and now move to php and mySQL. It just take me couple months to master php.
ASP Syntax (Toggle Plain Text)
<% ' Open database Dim Conn, RS Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Driver={MySql ODBC 3.51 Driver}; Server=localhost; database=dbname; uid=username; pwd=password; option=3;" Set RS = Conn.Execute("SELECT * From tblcart") ' display results While Not RS.EOF Response.Write RS.Fields("fieldname") & "<br>" RS.MoveNext Wend ' closing connection RS.Close Conn.Close Set RS = Nothing Set Conn = Nothing
Ecommerce-Web-Store.com Building Your e-Business.
I think there is one problem with mySQL when using ASP, when mySQL change version, your syntax written in ASP can be "out of date".... I suggest you to use ASP with MSSQL and mySQL with PHP, that makes it much easier to get help in the different forums and knowledge bases too! My experiences only, not necessary the truth :-)
Last edited by oscarsierra; Jun 17th, 2006 at 8:50 am.
![]() |
Similar Threads
- Php code confusion. Not sure how to describe (PHP)
- Can not fill dataset from database on other computer with ASP .NET and MS Access (Visual Basic 4 / 5 / 6)
- URGENT: UBBThreads MySQL database merge (MySQL)
- Backing up a MySQL database (MySQL)
- Update entire Mysql DataBase with PhP (PHP)
Other Threads in the ASP Forum
- Previous Thread: Count number of checkboxes being checked in asp.net
- Next Thread: Small date problem
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





