Article View: borland.public.cppbuilder.database.ado
Article #551Re: BCB6 Follow-up
From: poojo hackma
Date: Mon, 14 Nov 2005 16:19
Date: Mon, 14 Nov 2005 16:19
52 lines
3826 bytes
3826 bytes
Viatcheslav,
In my code listed below, Line 82 is throwing this error:
(this->Create(ConnectString, (VARIANT*)&Connection))
Error: 80040E73(-2147217805) @ C:\Program
Files\Borland\CBuilder6\Imports\ADOX_tlb.h/487
Press [Y]es to terminate, [N]o to continue and [C]ancel to Debug.
I have included the rest of my CREATE TABLE sql in the hopes that you (or
someone) can point out what will go wrong next before I get there. Some of
the column names are reserved words; so do I need to include them in
[bracket]s? Also, the examples I found only listed a type of "Int" and I
needed to distinguish between "Long Integer" and "Double;" so I substituted
"Int" in the code that I found online with those values ("Long Integer" and
"Double"). Am I doomed??? If so, could someone point me in the right
direction?
74: if (FileExists(OpenDialog1->FileName) == false) {
75: OpenDialog1->Execute();
76: }
77: if (FileExists(OpenDialog1->FileName) == false) {
78: TCOM_Catalog cat = CoCatalog::Create();
79: try { // read in the database
80: char createfile[MAXPATH];
81: strcpy(createfile, OpenDialog1->FileName.c_str());
82: cat->Create(WideString(createfile).c_bstr());
83: ADOConnection1->ConnectionString =
84: ConnectionString(OpenDialog1->FileName.c_str());
85: ADOQuery1->SQL->Clear();
86: ADOQuery1->SQL->Add("CREATE TABLE Table1 (");
87: ADOQuery1->SQL->Add(" ID Long Integer Identity Primary Key,");
88: ADOQuery1->SQL->Add(" Desc VarChar(50),");
89: ADOQuery1->SQL->Add(" Len Long Integer, Res Double, Val Double,");
90: ADOQuery1->SQL->Add(" Ofs Double, Min Double, Max Double,");
91: ADOQuery1->SQL->Add(" Unit VarChar(10), Type VarChar(50),");
92: ADOQuery1->SQL->Add(" Sus Long Integer, PGN Long Integer,");
93: ADOQuery1->SQL->Add(" start Long Integer)");
94: ADOQuery1->ExecSQL();
95: ADOQuery1->Close();
96: ComboBox1->Items->Add("Add New");
97: } catch (Exception* ex) {
98: MessageBox(NULL, ex->Message.c_str(), "DB Exception", MB_OK);
99: }
A0: }
I apologize for having to take up so much of your time. Is there somewhere
I can find this information on my own? I'm trying to reduce the amount of
time you are spending with me. I've been trying to read old messages of
yours. One in particular that looks very relevant is located at:
http://groups.google.com/group/borland.public.cppbuilder.database.ado/browse_thread/thread/624e139e318cdbfb/1fbeae2a8f29cce1?lnk=st&q=ADOX_tlb.h&rnum=2&hl=en#1fbeae2a8f29cce1
but it does not seem to tell me how to fix the problem I am having.
Technical Details
Message-ID:
<4378b969@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!msrn-out!msrn-in!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4374c751$1@newsgroups.borland.com> <4374d7fa$1@newsgroups.borland.com> <4374fc8b@newsgroups.borland.com> <43750df0$1@newsgroups.borland.com> <4375b348$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,fd44f1fbb79ff20c X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "poojo hackma" <poojo.com/mail> Newsgroups: borland.public.cppbuilder.database.ado References: <4374c751$1@newsgroups.borland.com> <4374d7fa$1@newsgroups.borland.com> <4374fc8b@newsgroups.borland.com> <43750df0$1@newsgroups.borland.com> <4375b348$1@newsgroups.borland.com> Subject: Re: BCB6 Follow-up Date: Mon, 14 Nov 2005 10:19:57 -0600 Lines: 54 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Response X-Antivirus: avast! (VPS 0546-0, 11/14/2005), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 12.45.133.147 Message-ID: <4378b969@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1131985257 12.45.133.147 (14 Nov 2005 08:20:57 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!msrn-out!msrn-in!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail