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



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

.



Relevant Pages

  • Re: Dlookup with 2 criteria
    ... >>Private Sub cboCat_AfterUpdate ... >>Dim Cat As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADOX Catalog
    ... >As stated previously, even if you ADOX code is perfect, I ... > Dim db As DAO.Database ... > Dim sConnect As String 'Connect string, ... >> Dim cat As ADOX.Catalog ...
    (microsoft.public.access.modulesdaovba)
  • Create Linked table in Access
    ... I am try to link a SQL 2000 table to Access 2000 using VB.Net 2003 ... Dim Con As New ADODB.Connection ... Dim Cat As New ADOX.Catalog ...
    (microsoft.public.dotnet.languages.vb)
  • Re: References changing between different platforms - DLL hell returns!
    ... Here is some code snippet for your reference. ... Dim cat As Object ... Dim tbl As Object ...
    (microsoft.public.excel.programming)
  • i have a question about rename table through ADOX with C++
    ... Dim cn As ADODB.Connection ... Dim cat As ADOX.Catalog ... There are some problem when i try to change it into VC++ .net format ... please give me some guidance on changing the ...
    (microsoft.public.dotnet.framework.adonet)