Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SQL Statements to Modify mySQL online DB


Message #1 by "Paul Ryan" <paulryan@r...> on Fri, 31 Aug 2001 10:21:27 +0100
Please help, am I able to modify my online mySQL database using SQL 

statements in my ASP code?  I keep getting errors at the moment.



Here is the code I am using:



Set Conn=3DServer.CreateObject("ADODB.Connection")

db_conn =3D "Driver=3D{MySQL};DATABASE=3Dmydatabase; UID=3Duserid; 

PASSWORD=3Dpassword;"

Conn.Open db_conn



sqlText1 =3D "UPDATE tablename SET address1 =3D '13 High Street' WHERE 

username =3D 'paul'"

db_conn.Execute sqlText1



Thanks for your time and trouble.



Message #2 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 10:35:32 -0500
The likelyhood that someone here can help you is pretty high.  However, more

detailed information will help us do that.  Please post the error messages

that you are receiving.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...



 



-----Original Message-----

From: Paul Ryan [mailto:paulryan@r...]

Sent: Friday, August 31, 2001 4:21 AM

To: ASP Databases

Subject: [asp_databases] SQL Statements to Modify mySQL online DB





Please help, am I able to modify my online mySQL database using SQL

statements in my ASP code?  I keep getting errors at the moment.



Here is the code I am using:



Set Conn=Server.CreateObject("ADODB.Connection")

db_conn = "Driver={MySQL};DATABASE=mydatabase; UID=userid;

PASSWORD=password;"

Conn.Open db_conn



sqlText1 = "UPDATE tablename SET address1 = '13 High Street' WHERE username

= 'paul'"

db_conn.Execute sqlText1



Thanks for your time and trouble.


  Return to Index