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 |
|
Lon
Starting Member
2 Posts |
Posted - 2011-02-24 : 14:03:04
|
Hello! First post here. Somewhat of a newbie, please go easy on me. I have an old banner rotation script that is now producing an error.The error is as follows:quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the varchar value '-1' to data type bit. /util_inc.asp, line 33
The code is as follows:29. Function utility_executeCommand(strSQL)30. Dim conDB31. Set conDB = Server.CreateObject("ADODB.Connection")32. conDB.Open DB_CONNECTION33. conDB.Execute utility_convertSQL(strSQL), ,USD_adCmdText34. conDB.Close35. End FunctionHoping it's something obvious.  |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-02-24 : 14:03:48
|
a bit is either 0 or 1. quit passing something else http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-25 : 09:12:27
|
| Can you post the string assinged to strSQL?See the differencedeclare @bit bitset @bit='-1'select @bitGOdeclare @bit bitset @bit=-1select @bitMadhivananFailing to plan is Planning to fail |
 |
|
|
Lon
Starting Member
2 Posts |
Posted - 2011-02-26 : 15:11:57
|
The script is no longer producing the error and I can't get it to reproduce, weird. I'm also unable to determine which lines of code are responsible as there are over 500 lines. Guess I'll tackle it if it happens again. Thanks for the quick responses! Great forum! |
 |
|
|
|
|
|