944,014 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 7537
  • VB.NET RSS
Jun 20th, 2005
0

Connecting and retrieving information from an MSSQL Table

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zaphod2003 is offline Offline
4 posts
since Jun 2005
Jun 20th, 2005
0

Re: Connecting and retrieving information from an MSSQL Table

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.

Quote 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
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Jun 21st, 2005
0

Re: Connecting and retrieving information from an MSSQL Table

As most comprehensive answer. I will certainly check these links out thanks a bundle, it was really driving me nutz.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zaphod2003 is offline Offline
4 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: When run the windows application by Compiler all works but after I deployed and run,
Next Thread in VB.NET Forum Timeline: Changing HKCU on a per user basis





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC