| | |
Connecting and retrieving information from an MSSQL Table
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
I have programmed a web application using classic ASP and MSSQL, but our company is upgrading to ASP.NET and for my next project I thought I would the application in pure VB.NET.
However, I am struggling to get my application to talk correctly to the MSSQL tables. I know my connection string is correct. But can anyone tell me how to do this?
1. Send SQL Query such as "select * from users where userid=<form field>"
2. Read the result of the query
I used to use ADODB and recordsets but ASP.NET appears to use something called datasets and I am really struggling to get my head around how this works.
Every example talks about displaying the data. I want to read the data not show it.
Any help appreciated or some clue as to how to resolve this issue
However, I am struggling to get my application to talk correctly to the MSSQL tables. I know my connection string is correct. But can anyone tell me how to do this?
1. Send SQL Query such as "select * from users where userid=<form field>"
2. Read the result of the query
I used to use ADODB and recordsets but ASP.NET appears to use something called datasets and I am really struggling to get my head around how this works.
Every example talks about displaying the data. I want to read the data not show it.
Any help appreciated or some clue as to how to resolve this issue
OK, are you doing this in ASP.NET with VB.Net Code behind or a Visual Basic.Net application? From your post, I get the feeling that it is in ASP.NET (.."I thought I would the application in pure VB.NET" = my confusion..)
Saying that, here is a very good overview of ADO.NET LINK
The Dataset is a "snapshot" of the data in the database at that moment in time. The idea behind ADO.NET is not the maintain a constant connection to the DB (i.e. hogging resources and processor time), but rather to grab the set of data requested (i.e dataset).
Datasets are much like a recordset.
The changes from ASP (Classic) to ASP.NET is the implementation of true OOP (Object Oriented Programming). Abstraction....encapsulation, and instatiation.
Another very good site, that I recommend you read through : Excellent Overview (with code)
Hope this helps
Be sure to check out the tutorials as well.
Saying that, here is a very good overview of ADO.NET LINK
The Dataset is a "snapshot" of the data in the database at that moment in time. The idea behind ADO.NET is not the maintain a constant connection to the DB (i.e. hogging resources and processor time), but rather to grab the set of data requested (i.e dataset).
Datasets are much like a recordset.
The changes from ASP (Classic) to ASP.NET is the implementation of true OOP (Object Oriented Programming). Abstraction....encapsulation, and instatiation.
Another very good site, that I recommend you read through : Excellent Overview (with code)
Hope this helps
Be sure to check out the tutorials as well.
•
•
•
•
Originally Posted by zaphod2003
I have programmed a web application using classic ASP and MSSQL, but our company is upgrading to ASP.NET and for my next project I thought I would the application in pure VB.NET.
However, I am struggling to get my application to talk correctly to the MSSQL tables. I know my connection string is correct. But can anyone tell me how to do this?
1. Send SQL Query such as "select * from users where userid=<form field>"
2. Read the result of the query
I used to use ADODB and recordsets but ASP.NET appears to use something called datasets and I am really struggling to get my head around how this works.
Every example talks about displaying the data. I want to read the data not show it.
Any help appreciated or some clue as to how to resolve this issue
![]() |
Similar Threads
- Retrieve Information from Database & Display into ASP.NET Web Controls Textbox (ASP.NET)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Connecting to and affecting programs with other programs. (C++)
- Retrieving information from hard drives... (Storage)
- Retrieving Information (Storage)
Other Threads in the VB.NET Forum
- Previous Thread: When run the windows application by Compiler all works but after I deployed and run,
- Next Thread: Changing HKCU on a per user basis
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown soap socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





