5 messages in com.mysql.lists.win32Is this Proper?| From | Sent On | Attachments |
|---|---|---|
| Ron Smith | 03 May 2005 11:02 | |
| PF: MySQL | 03 May 2005 11:27 | |
| Daniel da Veiga | 03 May 2005 11:38 | |
| jbon...@sola.com.au | 03 May 2005 17:16 | |
| Ron Smith | 04 May 2005 10:29 |
| Subject: | Is this Proper?![]() |
|---|---|
| From: | Ron Smith (geek...@yahoo.com) |
| Date: | 05/03/2005 11:02:27 AM |
| List: | com.mysql.lists.win32 |
This question may have been addressed before, but I'm still unclear as to what's
happening under the hood. I normally use ASP pages to access an MS Access
database, but I'd like to switch over to using ASP pages with MySQL.
Usually I use the following code to insert a record and then close the table and
connection with Access:
objRS.AddNew objRS("Name") = name objRS("Address") = address objRS("City") = city objRS("State") = state objRS("Zip") = zip objRS("Phone") = phone objRS.Update
objRS.close set objRS="nothing" objConn.close set objConn="nothing"
With MySQL, I use the following instead:
sql="insert into friends_contact_info.friends (Name, StreetAddress, City,
State, ZipCode, PhoneNumber) values ('"&name&"', '"&address&"', '"&city&"',
'"&state&"', '"&zip&"', '"&phone&"')"
set objRS=objConn.execute(sql)
I comment out the following lines when I'm adding records to MySQL tables. At
first, I was just commenting out the first two lines, but I would get an error
message. The record added to the table would be fine, but I'd get an error. So,
I decided to comment out everything to elliminate the error messages. Is this
proper or am I leaving the table and connection open? Is there a test for this,
after the the 'insert into' statement?
'objRS.close ' set objRS="nothing" 'objConn.close ' set objConn="nothing"




