|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 ![]() |
|
#2
|
||||
|
||||
|
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 & "') |
|
#3
|
|||
|
|||
|
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!! |
|
#4
|
||||
|
||||
|
Inserted an empty line? Do:
response.write(totalshelterfee & "<br>") response.write(datef_uvetvisit) response.end Make sure that your values are set as expected. |
|
#5
|
|||
|
|||
|
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 |
|
#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 |
|
#7
|
|||
|
|||
|
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 |
|
#8
|
|||
|
|||
|
Try and put # instead of ' for the date....
|
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > MS Access/ASP/SQL pain in buttski |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|