Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# replacement for VFP code
Message
 
À
03/12/2006 00:17:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01167122
Message ID:
01174474
Vues:
19
>Jojo,
>
>>If thats the case, then I think I had mis-understood the book I have about datasets?
>
>Either that or the author of the book doesn't have a clue! <g>
>
>>BTW, I think there is a difference between a datasets created with Delphi/Interbase and C#/VB.NET/MS SQL. But to conclude on this, I have to finish exporting Interbase Tables into VFP tables, strip duplicate data and migrate/upsize to SQL Server 2005. I'll post the difference if really has.
>
>No, the DataSet wouldn't be any different. A DataSet is a DataSet.

Well, its true, a dataset is a dataset but I think I have to make it clear what I mean "difference" and I mean datasets created with Delphi/Interbase and C#/VB.NET/SQL SERVER Application, the way how records are filled to a Datasets and how they are pulled down from the datasource to the client PC.

If you have coded Delphi/Interbase, you might know what im saying here, eventhough I'm a newbie, I have coded both C#/VB.Net/SQL 2005 and Delphi/Interbase app and I'm comparing this two.

>It doesn't matter where the data comes from. Here's a little snippet for >retrieving a DataSet from a SqlServer database:


>
>
>public DataSet GetMyData()
>{
>	string TestConnection = "server=(local);database=MyDataBase;uid=sa;pwd=MyPassword";
>	SqlDataAdapter da = new SqlDataAdapter("select * from bob", this.TestConnection);
>	DataSet ds = new DataSet();
>	da.Fill(ds, "MyTable");
>
>	return ds;
>}
>
>
>Now, if you weren't using SqlServer, you'd use the proper connection string for the other kind of database, plus you'd use the OleDbDataAdapter instead of the SqlDataAdapter:
>
>public DataSet GetMyData()
>{
>	string TestConnection = "MyDelphiConnectionString";
>	OleDbDataAdapter da = new OleDbDataAdapter("select * from bob", this.TestConnection);
>	DataSet ds = new DataSet();
>	da.Fill(ds, "MyTable");
>
>	return ds;
>}
>
>
>In either case, the DataSet object remains the same ... same DataSet, same DataTables, same DataRows ... only the data itself will be different.
>
>How was it explained in your book?

About disconnected datasets? Isn't it ADO.NET uses disconnected architecture? And DataSet is at the core of ADO.NET? If you say both yes, then it should be self explanatory.

Thanks
>~~Bonnie
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform