Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Is this Proper?

Is this Proper?

2005-05-03       - By Ron Smith

 Back
Reply:     1     2     3     4     5     6     7  

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"

Earn $52 per hosting referral at Lunarpages.