Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

SQL / ASP Newbie Question
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


Report this thread to moderator Post Follow-up to this message
Old Post
cpapplus@aol.com
04-22-05 06:23 PM


Re: SQL / ASP Newbie Question
Hi

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
>



Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
04-23-05 12:23 PM


Re: SQL / ASP Newbie Question
Thanks 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


Report this thread to moderator Post Follow-up to this message
Old Post
JTumbo
04-26-05 01:24 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 05:36 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006