Go to Post There's a fine line between idolizing someone and stalking! - Jay H 237 [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 13-06-2003, 12:04
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
It might be that the connection opened using the Jet provider can't handle a recordset and an update query at the same time. Just use an implicit connection like this:

Code:
Set MyConn = Server.CreateObject("ADODB.Connection")
	Set RS = Server.CreateObject("ADODB.Recordset")
	
	connectString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
	MdbFilePath = Server.MapPath("directory\todatabasefile.mdb")
	
	'open the recordset
	SQL_query = "SELECT * FROM files"
	RS.Open SQL_query, connectString
	
	'run the update query
	SQL_query = "UPDATE myTable SET myField = 'foo'"
	MyConn.Open connectString
	MyConn.Execute SQL_Query
If you're running SQL you should ALWAYS use parameterized queries or stored procedures. SQL injection is the easiest way for people to completely screw up your database.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any good HTML editors available? PMGRACER Website Design/Showcase 23 07-06-2003 21:02
NASA-TV links for Regionals Broadcasts archiver 2001 1 24-06-2002 01:59
What's better, PERL/cgi or PHP/my_sql? mikefrei Programming 10 27-05-2002 22:50
Webcast Links! Post links here! activemx Championship Event 0 21-04-2002 22:33
Rookie needs helpful programming links :) DanL Programming 15 23-02-2002 20:39


All times are GMT -5. The time now is 00:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi