Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I have a server - client write. I wrote a VB6 client application program you want to write a server with C#

(
client application Pic

Server application Pic
)

I asked this question in the Iranian forum but nobody seems to answer my

Please work with database VB6 code to C# back

1-Dataname.Recordset.AddNew
2-Dataname.Recordset.Delete
3-Dataname.Recordset.Move (5)
4-Dataname.Recordset.Update
5-Dataname.RecordSource = "select * from TableName where name = 'sara' "
6-Dataname.Refresh

I'm sorry my English is not good
Posted

It is a bit difficult to understand your problem, but I am guessing you are interested in using database technology. Take a look at http://www.codeproject.com/KB/database/[^], for some samples.
 
Share this answer
 
Comments
mohammadriano 8-Aug-12 5:18am    
Thank you
addnew record in C#?
delete record in C#?
move record in C#?example : move(20)
how write query in C#?
Richard MacCutchan 8-Aug-12 5:25am    
I guess you did not bother to research any of the articles then.
mohammadriano 8-Aug-12 5:43am    
http://dkr.comze.com/pic/c0958d82a830.jpg
Richard MacCutchan 8-Aug-12 5:50am    
Unfortunately I cannot read Farsi, so that makes no sense to me. Perhaps you could work with a friend or colleague who speaks good English.
mohammadriano 8-Aug-12 5:57am    
Persian writing is not important, they are stored in the database
If it is your intention to convert VB6 code to C# code then this means that your database interaction will change thouroughly and in fact you have multiple options.
1. The most simple option is to use ADO.NET.
In this case you have to create a dataset at design time, where you can add queries to your dataset at design time. This will create a whole lot of classes for you like a datatable and an adapter for each table you add to the dataset.
You can even add contraints to these tables. This way of working is called disconnected database access, because you are fetching the data and loading it in memory. If you ever change it and want to update the database you also use the adapters to do that, and they will just create a connection as they need it. The connection establishment to the database is transparent to the user.
2. This option is a little more advanced and cannot be applied for all databases because it is not supported by all of them. It is using an entity framework. But if you are a novice I'd recommend the first approach more than the second. It depends on the size of the application. For a big application with many tables this might be the way to go. But it will require you to build up some skills.
 
Share this answer
 
Comments
mohammadriano 8-Aug-12 5:43am    
http://dkr.comze.com/pic/c0958d82a830.jpg

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900