i have a question about rename table through ADOX with C++
- From: realjacky@xxxxxxxxx
- Date: 13 Mar 2006 01:17:16 -0800
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 write in VC++ .net
Set cn = New ADODB.Connection < ---- i cannot new it using cn = new
ADODB::Connection
cat.Tables("Authors").Name = "Authors2" < -------- Tables doesnt take
any argument
Is anyone try it before , please give me some guidance on that . Thanks
.
- Follow-Ups:
- Re: i have a question about rename table through ADOX with C++
- From: Stephen Howe
- Re: i have a question about rename table through ADOX with C++
- From: realjacky
- Re: i have a question about rename table through ADOX with C++
- Prev by Date: Re: Weird ADO failure/crash behaviour
- Next by Date: Re: i have a question about rename table through ADOX with C++
- Previous by thread: How select from 2 ADO.NET DataTables?
- Next by thread: Re: i have a question about rename table through ADOX with C++
- Index(es):
Relevant Pages
|
|