🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1611

ADOCommand INSERT

#1611
From: Zannha
Date: Tue, 01 Jun 2004 12:41
20 lines
1397 bytes
Argh,

what is wrong with this?

Form1->cmd->CommandText = "INSERT INTO mapdata ";
Form1->cmd->CommandText += "(layer, header, description, posx, posy,
category)";
Form1->cmd->CommandText += " VALUES ";
Form1->cmd->CommandText +=
"("+IntToStr(index)+",'"+header->Text+"','"+desc->Text+"',";
Form1->cmd->CommandText +=
IntToStr(mousex)+","+IntToStr(mousey)+",'"+cat->Text+"')";
Form1->cmd->Execute();

layer is a number field, header a text field, description a memo field, posx
and posy number field and category a text field.

I'm getting an exception saying Syntax error in INSERT INTO...

Zan
Technical Details
Message-ID: <40bc7971$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,469aaf2ccd19f05,start
X-Google-Attributes: gid10698b,public
From: "Zannha" <asd>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADOCommand INSERT
Date: Tue, 1 Jun 2004 14:41:25 +0200
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 83.109.44.214
Message-ID: <40bc7971$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086093681 83.109.44.214 (1 Jun 2004 05:41:21 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail