Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHello everyone,
I have created a database that I am storing customer information in.
Everyday, I am downloading the new customer information using a simple
asp script. What im having problems with is that I would like to
"archive" all of the customer data that I have already downloaded for
the day so that I do not download it again the next day. I have a
table "customer" where I have added the field "downloaded" that I would
like to set to 1 once the customer has downloaded. I am using the
following code and it does not seem to execute no matter what I do.
Can anyone tell me if there is something wrong with the code. Being a
newbie, im sure im just missing something really simple. Thanks for
the help!!
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("/fpdb/shop1.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" &
MdbFilePath & ";"
SQL_query = "UPDATE customer "
SQL_query = SQL_query & "SET downloaded = 1 "
SQL_query = SQL_query & "WHERE Orderid = " & OrderNum & "; "
Set Success = MyConn.Execute(SQL_query)
MyConn.Close
Set MyConn = Nothing
--JOHN
Post Follow-up to this messageHi This is a SQL server news group therefore you may be better posting to one more specific to Access or ASP. You don't say if you get an error message or not? This may be helpful http://www.aspfaq.com/show.asp?id=2142 John <cpapplus@aol.com> wrote in message news:1114190265.119657.260020@g14g2000cwa.googlegroups.com... > Hello everyone, > > I have created a database that I am storing customer information in. > Everyday, I am downloading the new customer information using a simple > asp script. What im having problems with is that I would like to > "archive" all of the customer data that I have already downloaded for > the day so that I do not download it again the next day. I have a > table "customer" where I have added the field "downloaded" that I would > like to set to 1 once the customer has downloaded. I am using the > following code and it does not seem to execute no matter what I do. > Can anyone tell me if there is something wrong with the code. Being a > newbie, im sure im just missing something really simple. Thanks for > the help!! > > Set MyConn = Server.CreateObject("ADODB.Connection") > MdbFilePath = Server.MapPath("/fpdb/shop1.mdb") > MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & > MdbFilePath & ";" > > SQL_query = "UPDATE customer " > SQL_query = SQL_query & "SET downloaded = 1 " > SQL_query = SQL_query & "WHERE Orderid = " & OrderNum & "; " > Set Success = MyConn.Execute(SQL_query) > > MyConn.Close > Set MyConn = Nothing > > --JOHN >
Post Follow-up to this messageThanks for the link. I am actually not even getting any errors. The script runs, everything displays as it should, but the darn records just don't get updated. From what I have been reading, I think that it may have something to do with a record locking problem. I am VERY unfamiliar with how to combat this problem if indeed that IS the problem. I will try posting in a more relavant group too. Thanks again! John
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread