473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Regarding an error

I m getting an error in this line

rs.open ExportSql, c,adOpenStatic,adLockReadOnly,adCmdTxt

any problme with this . can any one help me out ,
the error is


LogTime = 11/6/2007 9:19:26 AM
ASPCode =
ASPDescription =
Category = Microsoft OLE DB Provider for SQL Server
Column = -1
Description = Line 1: Incorrect syntax near '='.
File = /scripts/san/table/try.asp
Line = 386
Number = -2147217900
Source =
-----------------------


thanks in advance
Nov 6 '07 #1
3 1041
markrawlingson
346 Expert 100+
Sounds like a problem with your SQL statement.

Write out your SQL statement on the page so you can see what it actually says and what you're actually trying to tell SQL server to do.

Expand|Select|Wrap|Line Numbers
  1. Response.Write ExportSQL
  2.  
If the answer isn't evident after doing that... Show the SQL statement that you are using, and also show us the textual output of the SQL statement after you response.write it out on the page.

Sincerely,
Mark
Nov 6 '07 #2
Sounds like a problem with your SQL statement.

Write out your SQL statement on the page so you can see what it actually says and what you're actually trying to tell SQL server to do.

Expand|Select|Wrap|Line Numbers
  1. Response.Write ExportSQL
  2.  
If the answer isn't evident after doing that... Show the SQL statement that you are using, and also show us the textual output of the SQL statement after you response.write it out on the page.

Sincerely,
Mark

I am still getttin the same Error on Page nad the same above errror in the errorlog file,


ExportSql = "cp.dbo.spCode"_
& "@BCode=" & dbQuoteOrNull(sBCode) & " ,"_
& "@F_Ind =" & dbQuoteOrNull(bF_Ind) & " ," _
& "@S_Ind=" & dbQuoteOrNull(bS_Ind)& " ," _
& "@Active =" & dbQuoteOrNull(bActive) & " ," _
& "@ACF=" & dbQuoteOrNull(bACF)& " ," _
& "@BaseInd =" & dbQuoteOrNull(bBaseInd) & " ," _
& "@MHN=" & dbQuoteOrNull(bMHN)& " ," _
& "@SHEVHO=" & dbQuoteOrNull(bSHEVHO)


rs.open ExportSql, c,adOpenStatic,adLockReadOnly,adCmdTxt

PageCount = rs.pagecount
iTotalRecs = rs.recordcount

This is wht i have written and u asked me to put the response.write stmt. still im gettin the same error on page
Nov 6 '07 #3
I am still getttin the same Error on Page nad the same above errror in the errorlog file,


ExportSql = "cp.dbo.spCode"_
& "@BCode=" & dbQuoteOrNull(sBCode) & " ,"_
& "@F_Ind =" & dbQuoteOrNull(bF_Ind) & " ," _
& "@S_Ind=" & dbQuoteOrNull(bS_Ind)& " ," _
& "@Active =" & dbQuoteOrNull(bActive) & " ," _
& "@ACF=" & dbQuoteOrNull(bACF)& " ," _
& "@BaseInd =" & dbQuoteOrNull(bBaseInd) & " ," _
& "@MHN=" & dbQuoteOrNull(bMHN)& " ," _
& "@SHEVHO=" & dbQuoteOrNull(bSHEVHO)


rs.open ExportSql, c,adOpenStatic,adLockReadOnly,adCmdTxt

PageCount = rs.pagecount
iTotalRecs = rs.recordcount

This is wht i have written and u asked me to put the response.write stmt. still im gettin the same error on page
The output if i write the response.write(ExportSql)

cp.dbo.sp_Code@BCode=NULL ,@F_Ind =NULL ,@S_Ind=NULL ,@HIPC=NULL ,@Active =NULL ,@ACF=NULL ,@BaseInd =NULL ,@MHN=NULL ,@SHEVHO=NULL

what should be the possible error ???????

plus another thing i have noticed is after
rs.open ExportSql, c,adOpenStatic,adLockReadOnly,adCmdTxt

this stmt i m gettin the Application Error. i should actually get

cp.dbo.sp_Code@BCode=NULL ,@F_Ind =NULL ,@S_Ind=NULL ,@HIPC=NULL ,@Active =NULL ,@ACF=NULL ,@BaseInd =NULL ,@MHN=NULL ,@SHEVHO=NULL

So is there any problem with

rs.open ExportSql, c,adOpenStatic,adLockReadOnly,adCmdTxt

Please help
thanks in advance
Nov 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Samuel | last post by:
I wrote a very simple httpmodule and tried to compile it with no success. This is my code: ============== Imports System Imports System.Web Imports Microsoft.VisualBasic NameSpace...
3
by: darkstorm | last post by:
I have a doubt regarding inheritance involving templates Consider this: ///////////////////////////////////// template<typename T> class A { private: T m_a;
3
by: Marcelo | last post by:
Hello, I am trying to create a postback event, and it is working, just not calling the sub. I have a datagrid which has <asp:DataGrid id="Mensajes" ... <Columns> <asp:HyperLinkColumn ....
77
by: M.B | last post by:
Guys, Need some of your opinion on an oft beaten track We have an option of using "goto" in C language, but most testbooks (even K&R) advice against use of it. My personal experience was that...
15
by: sat | last post by:
i have seen the check status then it is showing like : Type Of Thread Status HoldL Resting Admin Thread Resting Worker Thread ...
6
by: Mikus Sleiners | last post by:
Is there any way to enable exception throws in VS 2005, that occur during binding operations? I am upset that i can't see exceptions that are thrown during binding operations. It's very hard to...
0
by: rsimlote | last post by:
I have a datagridview with 5 comboboxes. After selecting choices in the first row, when the user move on to or enter into the combobox in the next row, the selection from the previous row displays...
0
by: JYOTIRANJAN | last post by:
Hi All, My Application is developed using C on linux. It is a multithreaded application and 10 threads are waiting for message in pool.Each thread receives message continusly in a while loop from...
5
by: somenath | last post by:
Hi All , I have one question regarding scope and lifetime of variable. #include <stdio.h> int main(int argc, char *argv) { int *intp = NULL; char *sptr = NULL;
4
omerbutt
by: omerbutt | last post by:
hi there i am amking an inventory application with php,ajax,javascript,html,dhtml,sql the problem is that i have hidden the input fields regarding the replace no's of the parts with this line of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.