473,434 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Save dataset using Oledb Connection in VB.NET

mafaisal
142 100+
Hello

I am Using Vb.Net 2005 And Sql2005

See This

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim RsSave as new adodb.recordset
  3. RsSave.open "Select * From Table Where 1=2 ",Con,CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic
  4.  
  5. con.Begintrans
  6.  
  7. RsSave.AddNew
  8. RsSave.Fields(0).Value = textbox1.text
  9. RsSave.Fields(1).Value = textbox2.text
  10. RsSave.Fields(2).Value = textbox3.text
  11. RsSave.Update
  12.  
  13. Con.Commitrans
  14.  
This Just eg for saving to databse using Adodb connection And Recordset

My Question is Hw to Save like this using Oledb Connection And Dataset

I will Try for that but not getting

Faisal
May 4 '08 #1
2 3286
Dököll
2,364 Expert 2GB
Hello

I am Using Vb.Net 2005 And Sql2005

See This

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim RsSave as new adodb.recordset
  3. RsSave.open "Select * From Table Where 1=2 ",Con,CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic
  4.  
  5. con.Begintrans
  6.  
  7. RsSave.AddNew
  8. RsSave.Fields(0).Value = textbox1.text
  9. RsSave.Fields(1).Value = textbox2.text
  10. RsSave.Fields(2).Value = textbox3.text
  11. RsSave.Update
  12.  
  13. Con.Commitrans
  14.  
This Just eg for saving to databse using Adodb connection And Recordset

My Question is Hw to Save like this using Oledb Connection And Dataset

I will Try for that but not getting

Faisal
Greetings, mafaisal!

I took the liberty of modifying your title to see if you can get better hits that way; changed it from this 'Using Dataset in OledbConnection' to the above.

Secondly, I do believe you will get better support in VB.NET forum. Will send there; we aslo have and SQL forum, care to see what ideas you can pick up there also.

Good luck with the project!

Dököll
May 5 '08 #2
lotus18
866 512MB
Hi

You need to import System.Data.OleDb.

Rey Sean
May 5 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
5
by: Grant | last post by:
Hello, How come when I add a new row to my dataset table it shows up as changed (agencyData.Haschanges() = True) but when I delete a row the dataset thinks here are no...
1
by: Brian | last post by:
It's still not working - is still looking for the Database in the same folder as the photo just added. But i've realised something... bear with me here! :) The basics of the way my photo album...
4
by: Jae | last post by:
I'm writing a web application that exports and imports excel files. The application gets a list of users and their info and displays it in a datagrid .The user then selects to save the file as a...
1
by: yma | last post by:
Hi, I tried to use a listbox to display a column in MS Access 2000 nwind.mdb by using ole DataAdapter, Connection and dataset controls. But I got "It is already opened exclusively by another...
2
by: Stanav | last post by:
Hello all, I'm developing a web application using VB.Net 2003 and Framework 1.1. This application queries an AS/400 database. I'm using the IBM OleDb provider that came with IBM Client Access for...
4
by: Phoebe. | last post by:
Hi, Good Day! Reading 1 excel file into a dataset is fine. How can I read multiple excel with the same data structure into 1 dataset? How can I append those data? Can someone help? Thanks in...
3
by: Stanav | last post by:
Hello all, I'm developing a web application using VB.Net 2003 and Framework 1.1. This application queries an AS/400 database. I'm using the IBM OleDb provider that came with IBM Client Access for...
2
by: Scotty | last post by:
I get stuck to write an update, insert and delete command, i am looking for some help to start Whats the best way to update 2 tables toe the database (Access) below my code used to load my...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.