Connecting and retrieving information from an MSSQL Table

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2005
Posts: 4
Reputation: zaphod2003 is an unknown quantity at this point 
Solved Threads: 0
zaphod2003's Avatar
zaphod2003 zaphod2003 is offline Offline
Newbie Poster

Connecting and retrieving information from an MSSQL Table

 
0
  #1
Jun 20th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Connecting and retrieving information from an MSSQL Table

 
0
  #2
Jun 20th, 2005
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.

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
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 4
Reputation: zaphod2003 is an unknown quantity at this point 
Solved Threads: 0
zaphod2003's Avatar
zaphod2003 zaphod2003 is offline Offline
Newbie Poster

Re: Connecting and retrieving information from an MSSQL Table

 
0
  #3
Jun 21st, 2005
As most comprehensive answer. I will certainly check these links out thanks a bundle, it was really driving me nutz.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC