Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Insert method in ado.net disconnected Model within the ASP.NET forums, part of the Web Development category; Hi there, Probably this will look like a silly question to all you masters in asp.net but i am beginner and needs help. I know how we can write queries ...
|
|||||||
|
|||
|
Hi there,
Probably this will look like a silly question to all you masters in asp.net but i am beginner and needs help. I know how we can write queries in connected model but my question is how can we do these similar opertions(insert, delete, update) in disconnected model???? ![]() Please help... |
| Sponsored Links |
|
|||
|
Re: Insert method in ado.net disconnected Model
In Disconnected mode there is DataAdapter in between your application and database.
Dataapater retrieves all data from database like. da=new DataAdapter("Select * from SampleTable",cn); da.fill(dt); There are fill and update methods of DataAdapter for these operation. once you got the data in datatable then you can eaisily do the update ,Delete ,and Add operation on DataTable. and , Finally using update method just the database. da.Update(dt); Hope , this helps you. |
|
|||
|
Re: Insert method in ado.net disconnected Model
for update
dim cmd as new sqlcommand dim con as new sqlconnection con=Newsqlconnecton(configurationmanager.connectionstring("connectionstringname").connectionstring) con.open() cmd.connection=con cmd.comandtext="update tablename set pass=@pass where empcode=@empcode" cmd.parameter.add("@pass",sqldbtype,varchar,50).value=txtpass.text cmd.parameters.add("@Empcode",sqldbtype,varchar,50).value=session("empcode") cmd.execute nonquery() |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what is iso model | krishna sivaraman | Networking | 12 | 08-14-2009 02:41 AM |
| Difference between v model and and v-v model | dollyg_ind | Testing Issues | 2 | 03-07-2009 01:22 PM |
| qc disconnected in the middile of execution | madhava.sg | Quality Center | 1 | 01-09-2009 02:17 AM |
| Y and W Model | kumsan060 | Testing Issues | 0 | 03-28-2008 08:15 AM |
| Insert when, Insert all when difference | krishnaindia2007 | Oracle | 1 | 12-04-2007 02:10 AM |