can anyone check this and clear my error
Dim conn, spinsert
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open " Provider=sqloledb;Data Source=eightprinter;Initial Catalog=Movetest;User Id=moving;Password=moving123"
If conn.errors.count = 0 Then
Response.Write "Connected <br>"
spinsert = "dbo.Sp_Companydetails_Insert "&errCompname&" , "&errUser&" ,"&errPwd&" ,"&errBilling&","&errRbmover&","&errStatus&","&err开发者_JAVA技巧Sales&","&errContract&","&errMail&","&errPhone&","&errComment&","&errCreated&" ,"&errModified&""
conn.Execute(spinsert)
conn.close
End if
Trying to insert values into table through a stored procedure.
The above code shows incorrect syntax near conn.Execute(spinsert)
.
- You are triying to execute the Stored Procedure over the connection, bad idea.
- All your parameters are numeric? i cant see any "'" into the parameters. The String parameters needs to be with "'"
You can found information about the correct way to call stored procedures using ADO with ASP Pages on this Microsoft Support page http://support.microsoft.com/kb/164485
精彩评论