PC Review


Reply
Thread Tools Rate Thread

i have a question about rename table through ADOX with C++

 
 
realjacky@gmail.com
Guest
Posts: n/a
 
      13th Mar 2006
i have find some code on web :
Dim cn As ADODB.Connection
Dim t As Table

Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;data Source=C:\biblio.mdb"
Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
Set cat.ActiveConnection = cn
cat.Tables("Authors").Name = "Authors2"


'Iterate through the tables collection
For Each t In cat.Tables
If t.Name = "Authors2" Then
Debug.Print t.DateModified
End If
Next


cn.Close
Set cn = Nothing


There are some problem when i try to change it into VC++ .net format
Set cn = New ADODB.Connection < ---- i cannot new it by using cn = new
ADODB::Connection
cat.Tables("Authors").Name = "Authors2" < -------- Tables doesnt take

any argument

Moreover
Dim cat As ADOX.Catalog < ----Interop::ADOX::Catalog *cat it is work


Set cat = New ADOX.Catalog <------ cat = new Interop::ADOX::Catalog it
dont work, it said error C3153: 'Interop::ADOX::Catalog': you cannot
create an instance of an interface


Is anyone try it before , please give me some guidance on changing the
above code into VC++ .net . Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have I found a bug in VB.Net 2005 ADOX.Catalog? The Mad Ape Microsoft VB .NET 4 12th Jul 2008 11:54 PM
with Office 2002-ADOX, unable to link table through coding =?Utf-8?B?QWR2YW50?= Microsoft Access VBA Modules 1 20th Mar 2006 07:13 PM
ADOX performance problem: first attempt to read value from open ADOX catalog lasts long time lampi Microsoft Access 0 28th Apr 2005 01:21 PM
Create an access database through C# using ADOX. =?Utf-8?B?ZGVzYw==?= Microsoft Dot NET 2 22nd Nov 2004 09:23 PM
Can you rename a field and have it rename everywhere else it's referenced? Bayou BoB Microsoft Access Database Table Design 1 1st Dec 2003 01:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:31 AM.