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 |
hizakemi
Starting Member
33 Posts |
Posted - 2006-12-22 : 12:02:19
|
Please, help!I'm getting error '80020009' when I retrieve data from sql table. The error occurs only if the record(s) is not on the table. How do I fix it- Please, see part of my asp scriptThkset conn=server.createobject("ADODB.Connection")with conn .connectionstring=Session("strConn") .connectiontimeout=600 .cursorlocation= adUseClient .openend withset cmd=server.createobject("adodb.command")with cmd .activeconnection=conn .commandtype=adCmdText .commandtext="SELECT *, [current balance]+[MST_ACCR_INT_CTD] AS checkamount, CONVERT (NVARCHAR(10), T.[Check Issue Date], 1) AS CheckIssueDate FROM CLOSURE.DBO.[NAS] T WHERE " & strCriteria & " ORDER BY CAST(CONVERT(NVARCHAR(10), T.[DATE],101) AS DATETIME)"end with set rst=server.createobject("ADODB.Recordset") |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-22 : 12:07:31
|
Have you seen this link:[url]http://classicasp.aspfaq.com/general/why-do-i-get-80020009-errors.html[/url]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-22 : 23:18:58
|
1 Also this forum is to post workable scripts and not to ask questionsYou should post your questions at Relevent Forum2 You are using convert function on dates when you query from front end. Dont convert it, after retreiving data, convert it to the specific format using Format functionMadhivananFailing to plan is Planning to fail |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-12-23 : 21:13:48
|
3. you are issuing adhoc sql queries from app code - a no-no.4. your query is using "select *" which is fragile and error prone. if someone adds a column to the table, your app will break. www.elsasoft.org |
|
|
|
|
|