ASP.Net - Newbie Needs Some Help

P

Paul Smith

I am a newbie to ASP and I am trying to create a small on line
helpdesk reporting tool. I have a table with about 7 fields in a
database on an Sql server. I have created an ASP page with has Web
Form Text boxes etc on it.

I have connected the database to the form and got the sqlconnection
and have created a dataset.

But I am now stuck on how to update the database when ever one of my
users clicks onto the submit button. I have found various help
sheets, been on the ASP tutorials, but I am still not getting
anywhere.

Any help/advice/links greatly received.
 
M

Malik Asif Joyia

Hello
there are many ways to update you data in the tables
e.g

Dim SQLCon As New SqlConnection

Dim SQLComm As New SqlCommand

Dim SQLDa As New SqlDataAdapter

Dim DS As New DataSet

Dim _CommandText As String

Dim objDR As SqlDataReader





SQLCon.ConnectionString = "User ID=sa;pwd=helo;Initial Catalog=123;Data
Source=localhost"

SQLComm.Connection = SQLCon

SQLComm.CommandText = "UPDATE tbl_Users SET UserFName='" + UserFName.Text +
"', UserLName='" + UserLName.Text + "', UserAddress='" + UserAddress.Text +
"', UserPhone='" + UserPhone.Text + "' WHERE USERID=" + UserID.Text

SQLCon.Open()

SQLComm.ExecuteNonQuery()

Kind Regards
Malik Asif
 
A

Alan Silver

The .Net SDK is free, and an incredible resource. It has tutorials,
articles, sample code, and a complete reference to the Common Language
Runtime Library classes:

http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4
070-9F41-A333C6B9181D&displaylang=en

No offence, but it's also highly confusing and very daunting for a
beginner.

I would recommend a good book. I just finished reading ASP.NET Unleashed
by Steven Walther and can highly recommend it. It was very clear (if
rather long) and gave me a very good basis. I have learnt a lot in a
short time thanks to that book and a lot of help from the good folk
here.
 
K

Kevin Spencer

No offence, but it's also highly confusing and very daunting for a
beginner.

Pointers were daunting to me when I first started studying them. After
studying for a sufficient length of time, I was no longer a beginner.

No offense, but puting weights on your legs when running makes them
stronger. Running slower does not.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

I should clarify that I'm not taking exception to the recommendation of a
book. A book is a good way to get your feet wet. However, the SDK is free,
comprehensive, and authoritative, which is not the case of any book about
..Net. In other words, if the SDK is free, why not have it as a reference if
nothing else?

I should mention that when I first started working with ASP.Net I DID buy a
book on it, which I went through fairly quickly, and ever since have relied
on the SDK.

Also, the only daunting aspect of the SDK is the language it uses, which is
technical and precise. However, learning that language/syntax is invaluable
to any developer.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
A

Alan Silver

I should clarify that I'm not taking exception to the recommendation of a
book. A book is a good way to get your feet wet. However, the SDK is free,
comprehensive, and authoritative, which is not the case of any book about
.Net. In other words, if the SDK is free, why not have it as a reference if
nothing else?

Agreed 100%, I was just pointing out that a beginner could easily get
put off by the SDK. I know my first experience of it put me off
completely. I dropped the idea of ASP.NET for some time before coming
back to it. I tried the SDK again and found it just as off-putting. I
then got the book mentioned and found it wonderful. *Now* I can look at
the SDK and have half an idea what it means ;-)

I also don't believe in putting weights on your feet, but equally I
believe in starting with something you can handle.
I should mention that when I first started working with ASP.Net I DID buy a
book on it, which I went through fairly quickly, and ever since have relied
on the SDK.

Which is sensible and reasonable advice.
Also, the only daunting aspect of the SDK is the language it uses, which is
technical and precise. However, learning that language/syntax is invaluable
to any developer.

Agreed again.

I don't think we are arguing here, I was just issuing a warning about
expecting the SDK to be useful for a beginner, despite being free and
comprehensive. As a second (and further) step, it can't be beaten.

ta ra
 
K

Kevin Spencer

Okay, Alan, good enough. But tell me this: When you DID start using the .Net
SDK, did you still have to learn how to use it? Did putting off learning how
to use it make it any easier to learn? My point is, if you want to learn
something, you're going to have to work. Reading a book, while getting your
feet wet, is not going to prepare you to use the .Net SDK. Using the .Net
SDK is the only way. So, why put it off, since it is THE authoritative
reference?

If you want to get a book, well and good. But you should get the .Net SDK.
Not necessarly second, but ASAP. It is, after all, free. Eventually, it is
almost all you will use or need.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
A

Alan Silver

Okay, Alan, good enough. But tell me this: When you DID start using the .Net

Only after I had read the book, or at least most of it, and had a good
enough grasp on ASP.NET to be able to work out what the SDK was on
about. Before that, I found it confusing.
did you still have to learn how to use it?

The SDK? Sure, but I was talking about learning ASP.NET, not the SDK.
Did putting off learning how
to use it make it any easier to learn?

I think we may be at cross purposes. My comments about not using the SDK
straight away were because it put me off learning ASP.NET, not because
it put me off the SDK. Once I had seen enough ASP.NET to understand what
was going on, I could then make more sense of the SDK. Trying to use the
SDK to learn ASP.NET was what I found confusing.
My point is, if you want to learn
something, you're going to have to work.

Of course, but initially you might as well work on something that is
going to benefit you, rather than something that is going to confuse
you. You just need to know what order to tackle things. Once you have
the basics (which I couldn't get from the SDK), then you can dive into
the more complex stuff and really get going.
Reading a book, while getting your
feet wet, is not going to prepare you to use the .Net SDK. Using the .Net
SDK is the only way. So, why put it off, since it is THE authoritative
reference?

Again, I think we are getting mixed up here. I wasn't talking about
learning to use the SDK, obviously you need to do that at some point, I
was talking about learning to use ASP.NET, which I assumed was the
thrust of the OP's question. Reading a book was, for me, the most
productive thing I did for learning ASP.NET.
If you want to get a book, well and good. But you should get the .Net SDK.
Not necessarly second, but ASAP. It is, after all, free. Eventually, it is
almost all you will use or need.

Agreed 100%, well 99% actually, I wouldn't say you need it asap, I would
say you need it once you have a basic grip of what ASP.NET is about.
Whether that is asap or not depends on how fast you pick up ASP.NET!!
For me, it was a few weeks with a good book.

Ta ra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top