|
-
Dec 5th, 2006, 05:12 PM
#1
Thread Starter
Hyperactive Member
boolean values in an insert problem
I try to use this command:
Code:
Dim strSQL As String = "insert into Auto values('" & strVIN & "','" & strMake & "','" & strModel & "'," & intCatID & ",'" & strAutoYear & "'," & Math.Round(decAutoCost, 2).ToString & ",'" & RegExp.ToString & "'," & intISMiles & ",'" & ISDate.ToString & "','" & strStall & "'," & intCurrentMiles.ToString & "," & blnMntFlag.ToString & "," & blnDamageFlag.ToString & "," & blnRentable.ToString & ")"
which in this case builds this statement:
"insert into Auto values('A73jF72jhnf7','Yugo','Pimpmobile',5,'1977',100.00,'12/22/2006 4:08:23 PM',0,'12/5/2006 12:00:00 AM','A1',250000,False,False,True)"
and get this error:
The name "False" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
I could have sworn it took it in that form another time I did this. The table structure is in that order except the first column is, of course, the primary key which is an index so I left that out. It it getting confused and trying to put things in in the wrong order because of that? If so, how do I fix that. I totally need to fix it fast cuz I told myself I won't turn off this song on a loop until I fix this part of the project and it's Remind Me by Royksopp (from the Geico Airport Commercial) and it's gotta go real soon lol.
P.S. I'm using Microsoft SQL server and the last three column specs are bit
Last edited by Desolator144; Dec 5th, 2006 at 05:17 PM.
I tried to end process on Visual Studio 2005
but PETA stopped me saying it's smart enough
to be a living creature 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|