473,503 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data from DB

I am coming from the world of php, so please bear with me here.

In php, we open a connection to the db server with a connect function
(passing in the parameters). Then we select the database with another
function call. We then query the database with the SQL values in a sql
calling function and get back a resource (like a dataset). That resource
can be expanded to get all the column values requested for as many rows as
are pulled back.

How is it done in ASP.NET. I will have a button to click and that will
bring me to a method to access the database. How do I formulate the
interrogation (knowing the SQL call) so that I can then set values of
specific controls in the form from the values I get in the method? (I know
how to set them once I get them and I know SQL). What I am looking for is a
the set of calls (like mysql_connect, mysql_select_db, mysql_query and so on
in php).

I know about a connection control as I have used the GridView. However,
that gives the boundfields directly.

Shelly
Sep 5 '07 #1
3 1072
"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
How is it done in ASP.NET.
http://www.developerfusion.co.uk/show/4278/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 5 '07 #2
Thanks. That looks like what I was asking for. I'll try it later and
report.
Shelly

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
>How is it done in ASP.NET.

http://www.developerfusion.co.uk/show/4278/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 5 '07 #3
I succeeded. There were a few little things that I had to learn in the
process, such as where to put the Imports statements, but I got it going.
Thanks again.
"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
Thanks. That looks like what I was asking for. I'll try it later and
report.
Shelly

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
>>How is it done in ASP.NET.

http://www.developerfusion.co.uk/show/4278/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


Sep 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7975
by: Chris | last post by:
Could someone please provide me an effective means of exporting data from a data set (or data grid) to Excel?
9
3277
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
1
17274
by: djozy | last post by:
Please, I want to insert data into SQL Server database. I know for this commmand: SqlCommand myCommand= new SqlCommand("INSERT INTO table (Column1, Column2) " + "Values ('string', 1)",...
1
6805
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
0
5617
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
3
2042
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
5
2213
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and...
5
1781
by: DC Gringo | last post by:
I am having a problem reading a simple update to the database. Basically I'm testing a small change to the pubs database -- changing the price of the Busy Executive's Database Guide from 19.99 to...
14
14602
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
2054
by: Winder | last post by:
Computer Data Recovery Help 24/7 Data recovering tools and services is our focus. We will recover your data in a cost effective and efficient manner. We recover all operating systems and media....
0
7074
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
7273
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
7322
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
6982
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
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5000
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
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.