|
-
May 23rd, 2003, 10:56 AM
#1
Thread Starter
Frenzied Member
Saving a Created DataBase (Not Solved, But found an alternative way)
Alright, I am using ADO.Net... And so I created the DataBase with a lot of efforts... Good!
But now.. How do I save it?
Here is what I did:
Code:
this.oDs = new DataSet(DictionaryModule.myDB.Nombre);
Console.WriteLine("DataBase:" + DictionaryModule.myDB.Nombre);
DataTable oDtbl;
DataColumn oDclm;
foreach(DictionaryEntry myEntry in DictionaryModule.myDB){
Tabla tbl = DictionaryModule.myDB.Item(myEntry.Key.ToString());
Console.WriteLine("Table: " + tbl.Nombre);
oDtbl = new DataTable(tbl.Nombre);
foreach(string col in tbl.Columnas){
oDclm = new DataColumn(col);
Console.WriteLine("Column: " + col);
oDtbl.Columns.Add(oDclm);
}
this.oDs.Tables.Add(oDtbl);
}
//Create DataBase
System.IO.FileStream fileDB = new System.IO.FileStream(this.DBName + ".mdb", System.IO.FileMode.Create);
//How do I save it? :(
fileDB.Close();
this.oDs.Dispose();
Last edited by Tec-Nico; May 28th, 2003 at 01:26 AM.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|