Re: Creating tables in a JET database
- From: "Kalpesh" <shahkalpesh@xxxxxxxxx>
- Date: 22 Sep 2005 04:50:13 -0700
Instead of cat.ActiveConnection = "..........", use
cat.let_ActiveConnection("...............");
Foll. is the code, which I wrote
<snip>
ADOX.Catalog cat = new CatalogClass();
ADOX.Table tbl = new ADOX.TableClass();
try
{
cat.let_ActiveConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB");
}
catch (Exception e)
{
Console.WriteLine(e.InnerException.ToString());
}
tbl.Name = "kalpesh12345";
tbl.Columns.Append("Column1",ADOX.DataTypeEnum.adInteger ,0);
tbl.Columns.Append("Column2", ADOX.DataTypeEnum.adInteger,0);
tbl.Columns.Append("Column3", ADOX.DataTypeEnum.adVarWChar, 50);
cat.Tables.Append(tbl);
</snip>
HTH
Kalpesh
.
- Follow-Ups:
- Re: Creating tables in a JET database
- From: JohnFol
- Re: Creating tables in a JET database
- References:
- Creating tables in a JET database
- From: JohnFol
- Re: Creating tables in a JET database
- From: Kalpesh
- Creating tables in a JET database
- Prev by Date: DafaultView traversing, C#
- Next by Date: Re: OracleCommand.ExecuteScalar and PLSQL stored procedures
- Previous by thread: Re: Creating tables in a JET database
- Next by thread: Re: Creating tables in a JET database
- Index(es):
Relevant Pages
|