Re: i have a question about rename table through ADOX with C++
- From: realjacky@xxxxxxxxx
- Date: 13 Mar 2006 07:37:42 -0800
thanks and sorry about that
Stephen Howe 寫道:
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
1. That code is Visual BASIC code not C++
2. This newsgroup is for ADO not ADO.NET.
For ADO.NET post to microsoft.public.dotnet.framework.adonet
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
3. That is not C++. C++ does not have Set. And Array subscripts are [] not
().
Stephen Howe
.
- 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++
- References:
- 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++
- From: Stephen Howe
- i have a question about rename table through ADOX with C++
- Prev by Date: Re: i have a question about rename table through ADOX with C++
- Next by Date: Re: Connect to SQL Server
- Previous by thread: Re: i have a question about rename table through ADOX with C++
- Next by thread: Re: i have a question about rename table through ADOX with C++
- Index(es):
Relevant Pages
|
|