Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

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 ASP Free Forums Sponsor:
  #1  
Old October 1st, 2003, 12:14 PM
fuzzmom fuzzmom is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 fuzzmom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question MS Access/ASP/SQL pain in buttski

Sigh.... Not sure if I am posting in the correct forum, sorry.

I am attempting to create an online database using MS Access 2000, SQL, ASP, HTML, VBScript..... I am new to allllll of this.

The biggest problem I am having is figuring out the proper syntax for my queries, I am testing them in the SQL analyzer before placing in the form (This time..sheesh)

Using an INSERT INTO statement works fine with all of my fields set as "text"

However, I need date fields and currency fields (or do I?) in the actual database.

Partial codes Im having problem with:

INSERT INTO MC_MixTblTest ( TotalShelterFee, DateF_UVetVisit )
VALUES ('"&TotalShelterFee&"', '"&DateF_UVetVisit&"');

I tried using one quote, two quotes with number and currency format, and also text

Only the text format works. Anything else gives me this error message:
....Microsoft Access set 1 field to null due to type conversion failure....

Please HELP!!!
THANX

Reply With Quote
  #2  
Old October 2nd, 2003, 03:31 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Don't use quotes for integers, etc. (numbers) If TotalShelterFee is a number and DateF_UVetVisit is a date, do it like this:

INSERT INTO MC_MixTblTest ( TotalShelterFee, DateF_UVetVisit )
VALUES (" & TotalShelterFee & ", '" & DateF_UVetVisit & "')

Reply With Quote
  #3  
Old October 2nd, 2003, 05:37 PM
fuzzmom fuzzmom is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 fuzzmom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yah, I tried it like that too. I finally just changed all the fields to text to see what was going on and it accepted the input however, when I went to check the db, all it did was insert an empty line... any clue what is going on there?
Thanx!!

Reply With Quote
  #4  
Old October 3rd, 2003, 04:12 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Inserted an empty line? Do:
response.write(totalshelterfee & "<br>")
response.write(datef_uvetvisit)
response.end

Make sure that your values are set as expected.

Reply With Quote
  #5  
Old October 3rd, 2003, 07:18 PM
fuzzmom fuzzmom is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 fuzzmom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hmmmmmmm I will definitely give that a try, but Im wiped tonite... Im assuming you mean to Response.Write all the fields... that will take a while, (its a veeeerrrryyy long form), but I will get to it first thing in the am and let you know how I make out.
Thank you so much!!! I bet that works :-) If not, I will probably wind up redoing the whole db because I set it up when I really didnt know what I was doing.
Cindy

Reply With Quote
  #6  
Old October 3rd, 2003, 09:42 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Good luck. I will be on vacation starting tommorrow so I may not be able to answer any more emails until I get back.

Thanks,
Danny

Reply With Quote
  #7  
Old October 4th, 2003, 08:44 AM
fuzzmom fuzzmom is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 fuzzmom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Nope.... getting a blank page now and blank line in database

If you cant get back to me, have a great vacation!!

Ill redo the db with just that table and see what happens

Thanx for all you help :-)
Cindy

Reply With Quote
  #8  
Old July 24th, 2004, 09:14 PM
cawi17 cawi17 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 cawi17 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 51 sec
Reputation Power: 0
Smile Out #Date# for the date

Try and put # instead of ' for the date....

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > MS Access/ASP/SQL pain in buttski


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 1 hosted by Hostway