Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2005-08-25 : 11:29:28
|
| I am having trouble with a SQL INSERT statement. This is my code. if Action = "Execute" thenDim AddAuctAdTextDim InsertSQLSet AddAuctAdText = Server.CreateObject("ADODB.Command") AddAuctAdText.ActiveConnection = MM_FarmWorld_STRING InsertSQL = "Insert into tblAuctionAd (EventID, AdText) values (" & EventID & ",'" & AdText & "')" AddAuctAdText.Execute AddAuctAdText.ActiveConnection.CloseResponse.Redirect("AmendAuctAd.asp")& "?EventID="& EventIDend ifI am getting the following error . . .Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'Command text was not set for the command object. Thanks. |
|
|
ajthepoolman
Constraint Violating Yak Guru
384 Posts |
Posted - 2005-08-25 : 13:14:11
|
| Should it be this?AddAuctAdText.Execute(InsertSQL)AjHey, it compiles. |
 |
|
|
|
|
|