Article View: comp.databases.ms-sqlserver
Article #133Re: HELP-----Insert into
From: Lewis Bruck
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
41 lines
1560 bytes
1560 bytes
The SQL should read "Insert Into Shippers Values (%s, %d)". You don't need
parentheses around the values clause. With the parentheses it is trying to
interpret what is enclosed as a list of column names...
Thomas wrote in message <7mh1db$oh7$1@news.inet.tele.dk>...
>Hello
>
>I have a problem whit insert into and I have try this
>and get this error massage
>
>Ncorrect syntax near the keyword 'values'
>I uses Delphi3 and sql server 7.0
>
>what have I done wong?
>please help
>
>
>procedure TForm1.Button1Click(Sender: TObject);
>begin
>with th do
> begin
> try
> Close;
> SQL.Clear;
> SQL.Add(Format('Insert Into
>Shippers(Values(%s,%d)',['Thomas',12345]));
> Prepare;
> ExecSQL;
> Except
> On Exception do
> raise;
> end; {try-except}
> end; {with}
>
>end;
>
>
>
>:-) Thomas
>
>
Technical Details
Message-ID:
<378c4661@news.nwlink.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7mh1db$oh7$1@news.inet.tele.dk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff490,7744181f07638e26 X-Google-Attributes: gidff490,public X-Google-Thread: 104de1,7744181f07638e26 X-Google-Attributes: gid104de1,public From: "Lewis Bruck" <lbruck@nwlink.com> Subject: Re: HELP-----Insert into Date: 1999/07/14 Message-ID: <378c4661@news.nwlink.com> X-Deja-AN: 500849077 References: <7mh1db$oh7$1@news.inet.tele.dk> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Trace: 14 Jul 1999 01:12:17 -0700, arkydia.com Organization: Northwest Link Newsgroups: comp.databases.ms-sqlserver,cz.comp.microsoft.sql