|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help! SQL insert
hey guys i'm really furious abt tis. i don know wat is wrong with tis sql insert statement but whenever i execute it says tat syntax error in insert into statement:
> strSqlCmd = "INSERT INTO VENDOR " & _ "(Name,Address,Club,Phone,Email,UserName,Password)" & _ "VALUES ('" & strCName & "','" & strAddress & "','" & _ strClub & "','" & strPhone & "','" & strEmail & "','" & strUName & "','" & _ strPwd & "')" > > tis is my statement |
|
#2
|
||||
|
||||
|
Hi,
the sql looks good, but the field names seem to use reserved words (username), wrap your field names in []'s and try not to use reserved words in your query: Code:
strSqlCmd = "INSERT INTO VENDOR " & _ "([Name],[Address],[Club],[Phone],[Email],[UserName],[Password])" & _
"VALUES ('" & strCName & "','" & strAddress & "','" & _
strClub & "','" & strPhone & "','" & strEmail & "','" & strUName & "','" & _
strPwd & "')"
hope this helps
__________________
Look! Its a ShemZilla ![]() ![]()
|
|
#3
|
|||
|
|||
|
Thanks dude; i did not notice that reserved word .........
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Help! SQL insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|