DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 6 Jul 2007 22:28:28 -0600,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Terry Olsen
          2    PvdG42
                 3    Terry Olsen
                        4    Kerry Moorman
          5    Rad [Visual C# MVP]
          6    Sergey Poberezovskiy


Need help with SYNTAX Error   
I'm getting a SYNTAX error in this statement:

INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
'',
'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
(08/37)',
'4/11/2007',
'None@none.a (Sxerks)',
5082)

I believe it might have something to do with the double-quotes in the 
subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
Can someone point out where I'm going wrong in this statement?

Thanks!
Date:Fri, 6 Jul 2007 22:28:28 -0600   Author:  

Re: Need help with SYNTAX Error   
"Terry Olsen"  wrote in message 
news:%234TyE9EwHHA.4480@TK2MSFTNGP02.phx.gbl...

> I'm getting a SYNTAX error in this statement:
>
> INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
> '',
> 'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
> (08/37)',
> '4/11/2007',
> 'None@none.a (Sxerks)',
> 5082)
>
> I believe it might have something to do with the double-quotes in the 
> subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
> Can someone point out where I'm going wrong in this statement?
>
> Thanks!

What database engine? SQL Server 2005, SQL Server 2000, Oracle, etc.?
What are the data types of the fields in the table?
And, exactly what is the error message you are getting?
Date:Sat, 7 Jul 2007 00:20:02 -0500   Author:  

Re: Need help with SYNTAX Error   
MDB file, using OLEDB. The error is "SYNTAX error in statement"

"PvdG42"  wrote in message 
news:efPq8ZFwHHA.4480@TK2MSFTNGP02.phx.gbl...

>
> "Terry Olsen"  wrote in message 
> news:%234TyE9EwHHA.4480@TK2MSFTNGP02.phx.gbl...
>> I'm getting a SYNTAX error in this statement:
>>
>> INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
>> '',
>> 'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
>> (08/37)',
>> '4/11/2007',
>> 'None@none.a (Sxerks)',
>> 5082)
>>
>> I believe it might have something to do with the double-quotes in the 
>> subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
>> Can someone point out where I'm going wrong in this statement?
>>
>> Thanks!
> What database engine? SQL Server 2005, SQL Server 2000, Oracle, etc.?
> What are the data types of the fields in the table?
> And, exactly what is the error message you are getting?
> 
Date:Sat, 7 Jul 2007 08:13:32 -0600   Author:  

Re: Need help with SYNTAX Error   
Terry,

"From" is a reserved word in Access. You will need to change the name of the 
column.

Kerry Moorman


"Terry Olsen" wrote:


> MDB file, using OLEDB. The error is "SYNTAX error in statement"
> 
> "PvdG42"  wrote in message 
> news:efPq8ZFwHHA.4480@TK2MSFTNGP02.phx.gbl...
> >
> > "Terry Olsen"  wrote in message 
> > news:%234TyE9EwHHA.4480@TK2MSFTNGP02.phx.gbl...
> >> I'm getting a SYNTAX error in this statement:
> >>
> >> INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
> >> '',
> >> 'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
> >> (08/37)',
> >> '4/11/2007',
> >> 'None@none.a (Sxerks)',
> >> 5082)
> >>
> >> I believe it might have something to do with the double-quotes in the 
> >> subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
> >> Can someone point out where I'm going wrong in this statement?
> >>
> >> Thanks!
> > What database engine? SQL Server 2005, SQL Server 2000, Oracle, etc.?
> > What are the data types of the fields in the table?
> > And, exactly what is the error message you are getting?
> > 
> 
> 
> 
Date:Sat, 7 Jul 2007 07:22:01 -0700   Author:  

Re: Need help with SYNTAX Error   
On Fri, 6 Jul 2007 22:28:28 -0600, "Terry Olsen"
 wrote:


>I'm getting a SYNTAX error in this statement:
>
>INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
>'',
>'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
>(08/37)',
>'4/11/2007',
>'None@none.a (Sxerks)',
>5082)
>
>I believe it might have something to do with the double-quotes in the 
>subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
>Can someone point out where I'm going wrong in this statement?
>
>Thanks! 
>


1) What is the syntax error?
2) User parameterized queries ... they'll shield you from all the
associated problems of escaping strings, formatting of date values,
etc

--
http://bytes.thinkersroom.com
Date:Sat, 07 Jul 2007 19:41:33 +0300   Author:  

RE: Need help with SYNTAX Error   
Terry,

As Kerry said, "From" is a reserved word, and cannot be used in this context.
However, you do not need to rename the column in the table - just wrap the 
column name in square brackets in your insert statement:
[From]

hope this helps

"Terry Olsen" wrote:


> I'm getting a SYNTAX error in this statement:
> 
> INSERT INTO Usenet (MessageID,Subject,ArticleDate,From,Lines) VALUES (
> '',
> 'TG FM - The Eternal Candle - "eternalcandle_v.1.1.zip" 22716KB yEnc 
> (08/37)',
> '4/11/2007',
> 'None@none.a (Sxerks)',
> 5082)
> 
> I believe it might have something to do with the double-quotes in the 
> subject or the LessThan & GreaterThan in the MessageID, but I'm not sure. 
> Can someone point out where I'm going wrong in this statement?
> 
> Thanks! 
> 
> 
> 
Date:Sun, 8 Jul 2007 15:14:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us