SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 2nd, 2003, 09:39 AM
gintom gintom is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Essex, UK
Posts: 164 gintom User rank is Private First Class (20 - 50 Reputation Level)gintom User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 17 h 16 m 46 sec
Reputation Power: 5
deleting from access database

This is the code that I am using to delete from the database, but it doesnt seem to work any ideas people?
Code:
<%
SQL = "DELETE FROM jobs WHERE date = #" & personaldeletejobs & "#"              
 set Rs = Conn.Execute(SQL)
%>

the "personaldeletejobs" contains a date element.

Reply With Quote
  #2  
Old October 2nd, 2003, 10:05 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
Do you get any errors?

It seems to me that some versions of Access mdb's needed "DELETE * FROM ..."

Reply With Quote
  #3  
Old October 2nd, 2003, 10:10 AM
gintom gintom is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Essex, UK
Posts: 164 gintom User rank is Private First Class (20 - 50 Reputation Level)gintom User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 17 h 16 m 46 sec
Reputation Power: 5
I have tried it with and without '*' but still the item doesnt delete from the table.

Reply With Quote
  #4  
Old October 2nd, 2003, 10:17 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
Leave the * in there, it's proper technique for TSQL.

Print the SQL line to screen and run it against access to make sure.

Make sure your ODBC drivers are pointing to the right server.

Reply With Quote
  #5  
Old October 2nd, 2003, 10:26 AM
adogfart adogfart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 26 adogfart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
are you sure the dates in the DB have the same format (eg. dd/mm/jjjj) as "personaldeletejobs" ?

Greetz,

Reply With Quote
  #6  
Old October 2nd, 2003, 07:47 PM
pda8333 pda8333 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 216 pda8333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 5
tried your code and works fine for me. Are you sure your date format is the same as your d/b (mm/dd/yyyy)?

btw, what error msg did it show out?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > deleting from access database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway