Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › I need a SQL guru for a small ASP instruction
New Posts  All Forums:Forum Nav:

I need a SQL guru for a small ASP instruction

post #1 of 5
Thread Starter 
Hey guys, I'm having trouble with my sql statements.
Thing is, I'm new to ASPX and those quotes are killing me.

Note : All the variables are strings, except for ag which is a Int and bool a boolean
Note 2 : Those variable are french, but programmation makes it so awesome you can still understand it

Code:
  strSQL = "INSERT INTO classified (" & _
  "email,"     & _
  "[password],"& _
  "confirmed," & _
  "nom,"       & _
  "prenom,"    & _
  "age,"       & _
  "adresse,"   & _
  "ville,"     & _
  "province,"  & _
  "codepostal,"& _
  "telephone, "& _
  "animal,"    & _
  "race,"      & _ 
  "nomanimal"& _
  ") VALUES ('" & emai & "','"& pass & "','"& bool & "','"& no & "','"& preno & "'," & ag & ",'"& adress & "','"& vill & _
  "','"& provinc & "','"& codepostal & "','"& telephon & "','"& animal & "','"& rac & "','"& nomanima & "')"
The error that it gives me is Data types in the criterion expression are incompatible.

Now, I'm pretty sure it's something messed up with the Values, I got an headache been working on this for a while now and it's pretty basic IMO.
Makes me sad

Oh and in the access database : Everything is set to text except the bool and the int is at numeric.

Thanks a million !

Gentlemens, get ready to
post #2 of 5
Thread Starter 
Looks like it was the boolean that didn't need the '
post #3 of 5
Do you have to use dynamic SQL?
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #4 of 5
Thread Starter 
I havn't been teached any other way to insert in a database.

Now I'm stuck with an other problem, I've got my Sub called InsertRecord()
When I press my submit button it will simply ignore the onClick statement, I tried to add to the form onFormSubmit="InsertRecord" but it doesn't work
post #5 of 5
Thread Starter 
Woot got it
I was trying to use an HTML button with ASP -_-''
If you know a little about ASP, that's a very stupid error on my part ^^
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › I need a SQL guru for a small ASP instruction