Article View: borland.public.cppbuilder.database.ado
Article #2097Re: New problem with ADO & Access
From: Vladimir Afanasyev
Date: Tue, 04 Nov 2003 17:03
Date: Tue, 04 Nov 2003 17:03
53 lines
2569 bytes
2569 bytes
Hi,
>
>Hi Vladimir,
>
>Yes, I tried it, but I had trouble following some of it because there is no
>explanation of what is happening, or supposed to happen.
Yes, you are right but when idea comes it's so quickly that
no time for comments - only for code. Sorry.
Now when I had created my site I will write some article on it
that refer to my download. But my English bad so no warranty
again.
Any automating idea (for Word, Excel, ADO, MS Project) revolve
on object model and my samples come from it.
In most cases Variant type gives many similarity with Visual
Basic so when I create download I study VB samples from
Microsoft Platform SDK.
As I understand your code you try to use SQL for creating
tables but in SDK help you can see samples with object
Table, Columns, etc:
(VB)
The following code demonstrates how to create a new table.
' BeginCreateTableVB
Sub CreateTable()
Dim tbl As New Table
Dim cat As New ADOX.Catalog
'Open the catalog.
' Open the Catalog.
cat.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\Program Files\Microsoft Office\" & _
"Office\Samples\Northwind.mdb;"
tbl.Name = "MyTable"
tbl.Columns.Append "Column1", adInteger
tbl.Columns.Append "Column2", adInteger
tbl.Columns.Append "Column3", adVarWChar, 50
cat.Tables.Append tbl
The right idea it is redo this code. Try it.
If you will have problems put message here and
I try create such code and put it in the conference.
Best regards,
Vladimir.
Technical Details
Message-ID:
<3fa7ea09$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fa6811e$1@newsgroups.borland.com> <3fa77c01$1@newsgroups.borland.com> <3fa7ac8a$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,f2b48c4b0b8a3004 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-11-04 10:10:42 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: New problem with ADO & Access Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 212.82.216.226 X-Forwarded-For: 192.168.0.147 References: <3fa6811e$1@newsgroups.borland.com> <3fa77c01$1@newsgroups.borland.com> <3fa7ac8a$3@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <3fa7ea09$1@newsgroups.borland.com> Date: 4 Nov 2003 10:03:53 -0700 X-Trace: newsgroups.borland.com 1067969033 207.105.83.66 (4 Nov 2003 10:03:53 -0700) Lines: 53 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail