🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ADO Command + ms Access update problem

#3610
From: Sander
Date: Thu, 18 Jul 2002 12:54
25 lines
1535 bytes
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: <3d36bab7_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!panix!news.stealth.net!news.stealth.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,7d226fd454d56977,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-18 06:06:05 PST
From: "Sander" <sanderh@chello.nl>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO Command + ms Access update problem
Date: Thu, 18 Jul 2002 14:54:06 +0200
Lines: 27
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: <3d36bab7_1@dnews>
X-Trace: dnews 1026996919 213.73.169.191 (18 Jul 2002 05:55:19 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!panix!news.stealth.net!news.stealth.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews