PC Review


Reply
Thread Tools Rate Thread

asp to asp.net syntax error

 
 
amitbadgi@gmail.com
Guest
Posts: n/a
 
      10th Aug 2005
I am gettign this error while converting an asp application to asp.net
, its a query syntax error,
Exception Details: System.Runtime.InteropServices.COMException:
Syntax error in query expression 'id =System.__ComObject'.

Source Error:

Line 191: counter = 1Line 192: for i = 0 to ubound(emaillist)Line
193: rs_email = conn.execute("select * from tblusers where id =" &
emaillist(i))Line 194: tolist = tolist & rs_email("email") & ";"Line
195:


Source File: C:\Documents and Settings\amit\WebSite1\email_form.aspx
Line: 193

Stack Trace:

[COMException (0x80040e14): Syntax error in query expression 'id
=System.__ComObject'.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack) +973
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +153
ASP.email_form_aspx.__Render__control1(HtmlTextWriter __w, Control
parameterContainer) in C:\Documents and
Settings\amit\WebSite1\email_form.aspx:193
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
ICollection children) +98
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Page.Render(HtmlTextWriter writer) +27
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter) +280
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+8879

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      10th Aug 2005
When converting from ASP to ASP.Net, it is much better to convert the use of
ADO COM to ADO.Net. COM usage in .Net requires Interop, which is difficult
and problematic, as well as costly in terms of resource usage. I would
therefore recommend converting all of your ADO COM functionality to ADO.Net.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am gettign this error while converting an asp application to asp.net
> , its a query syntax error,
> Exception Details: System.Runtime.InteropServices.COMException:
> Syntax error in query expression 'id =System.__ComObject'.
>
> Source Error:
>
> Line 191: counter = 1Line 192: for i = 0 to ubound(emaillist)Line
> 193: rs_email = conn.execute("select * from tblusers where id =" &
> emaillist(i))Line 194: tolist = tolist & rs_email("email") & ";"Line
> 195:
>
>
> Source File: C:\Documents and Settings\amit\WebSite1\email_form.aspx
> Line: 193
>
> Stack Trace:
>
> [COMException (0x80040e14): Syntax error in query expression 'id
> =System.__ComObject'.]
> Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> Type objType, String name, Object[] args, String[] paramnames,
> Boolean[] CopyBack) +973
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +153
> ASP.email_form_aspx.__Render__control1(HtmlTextWriter __w, Control
> parameterContainer) in C:\Documents and
> Settings\amit\WebSite1\email_form.aspx:193
> System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
> ICollection children) +98
> System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
> System.Web.UI.Page.Render(HtmlTextWriter writer) +27
> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
> ControlAdapter adapter) +53
> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter) +280
> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> +8879
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message: Syntax error(missing operator)in query expression =?Utf-8?B?TGVzbGll?= Microsoft Access Form Coding 2 28th Oct 2005 09:39 PM
Run-time error '3077': Syntax error (missing operator) in expression. Shaun Microsoft Access Form Coding 0 18th Aug 2004 05:45 PM
Syntax Error - Code: 800AO3EA - Souce: Microsoft VBScript compliation Error Kreacher Microsoft Windows 2000 1 23rd May 2004 12:23 PM
A runtime error has occured. Do you want to debug? Line: 1 Error: syntax error Eric Windows XP Networking 0 24th Nov 2003 03:45 PM
A Runtime error has occured. Do you wish to Debug? Line:1 Error: Syntax error Darryl Microsoft Windows 2000 Applications 0 1st Oct 2003 10:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:16 AM.