🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO Command + ms Access update problem

#3613
From: Sander
Date: Thu, 18 Jul 2002 17:13
31 lines
1871 bytes
found it. I misspelled the table name.Stupid!!

"Sander" <sanderh@chello.nl> schreef in bericht news:3d36bab7_1@dnews...
> when I try to update a record with ado command and ms access I get the
> message that my name field (TEXT) has no default value. I've opened the
mdb
> file in ms access and gave the name field a default value, but I stil get
> the same error. does anybody know what is wrong???
>
> the code:
>
>     ADOCommand->CommandType = cmdText;
>     String name = txtName->Text;
>     String ID = "1";
>
>     String SQL="UPDATE `tblData` ";
>     SQL = SQL + "Set Name=\""+name+"\" ";
>     SQL = SQL + "WHERE ID = " + ID + ";";
>
>     Application->MessageBox(SQL.c_str(), "SQL", MB_OK);
>
>     ADOCommand->CommandText=SQL;
>     ADOCommand->Execute();
>
>
>
> Thanx,
>
> Sander
>
>
Technical Details
Message-ID: <3d36f78a_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!ps01-sjc1!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3d36bab7_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,7d226fd454d56977
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-18 10:45:49 PST
From: "Sander" <sanderh@chello.nl>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d36bab7_1@dnews>
Subject: Re: ADO Command + ms Access update problem
Date: Thu, 18 Jul 2002 19:13:34 +0200
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 213.73.169.191
Message-ID: <3d36f78a_2@dnews>
X-Trace: dnews 1027012490 213.73.169.191 (18 Jul 2002 10:14:50 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!ps01-sjc1!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!dnews