Page view counter
HomeLearnSQL Server VideosConnecting your Web Application to SQL Server 2005 Express Edition  

Connecting your Web Application to SQL Server 2005 Express Edition

SQL Server beginners will walkthrough the entire workflow of creating a database driven Web application and use visual tools to quickly create an administration application.

Duration: 1 hour, 5 minutes

Date: 20 March 2006

Watch the video   |   Download the video   |   Get the code

Comments : 21

Leave a Comment

Cisco : On March 07, 2008 4:03 PM said:

Is there a way to get the code that is not in the msi? I am not sure why but the MSI does not install or let you see the code on the webpages or the code behind.

Capiel : On March 17, 2008 6:18 AM said:

I had the same problem with the MSI code.

I watched the full video and copied the C# code.

As I was testing, I recieved the following Exception message:

"Arithmetic overflow error converting expression to data type smalldatetime. The statement has been terminated."

My code is exactly the same as in the video. What could be wrong?

sam2000 : On March 26, 2008 4:47 PM said:

I have the same the problem as you ("Arithmetic overflow error converting expression to data type smalldatetime. The statement has been terminated.").

One way to work around the problem is to edit the column definiton of your table and then change the "DateTimeStamp" field type from "smalldatetime" to "varchar(50)".

It worked for me. I hope it helps you too.

I wrote the code from scratch by the way since I couldn't access the given code.

hakanbilge : On April 02, 2008 3:53 PM said:

There is no code for the project for video 8.There is only a shortcut for project but not project.What is the problem?Is there anyone can help me?

hakanbilge : On April 02, 2008 3:54 PM said:

there is no code ın these code section.there ıs only a shortcut for project , but not project.

sam2000 : On April 09, 2008 2:11 AM said:

I couldn’t access the code either. You can write the code yourself since there is not much to write.

You can also learn better this way.

Start a new project and pause during the video and write your code (just type what the instructor types).

You don’t really need source code.It's Straight forward.

siggesamson : On May 07, 2008 3:57 AM said:

I had the same problem. Sure, you can write the code yourself, but you can´t write the "code" for the css. It would be better if you could download all the code.

parkerdc : On May 07, 2008 9:35 AM said:

Yep, same problem downloading the code.

These videos were done by learnvisualstudio.net and as a member there, I was able to download the code.

I have the code on my site so you can download it.

htttp://www.deanparker.com/DashSkateboards.zip

1.47 mb

Diego.Atreyu : On June 03, 2008 11:08 PM said:

Thanks parkerdc your help was very important to me,

cuz my perfeccionism won't let me go forward before I get to develop an equal project. xD

bluerainsigma : On June 05, 2008 12:10 PM said:

good video having the code would be nice

Diego.Atreyu : On June 07, 2008 11:29 AM said:

bluerainsigma, you can download de code in that link above

www.deanparker.com/DashSkateboards.zip

dw.egun1 : On July 14, 2008 5:02 AM said:

Thanks for the video. It is very good.

muhammed : On July 21, 2008 4:20 AM said:

rthanks for the video its realy good

lonelyhero : On August 12, 2008 1:23 PM said:

I want to learn a lot but I don't find code for project what I want

riccardof : On August 21, 2008 8:55 PM said:

Why is it that the data appears in admin, but after debugging, if you click to show table data the database is empty?

Gabriel82 : On September 02, 2008 6:47 PM said:

I made some changes in the Code to stop dublicating an email and Label in the same page.

Try it with Ajax its great!

----------Code-------------

Protected Sub Submitbottom_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submitbottom.Click

       Dim dtbsourceemail As New SqlDataSource()

       dtbsourceemail.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnection" ).ToString()

       Dim con As New System.Data.SqlClient.SqlConnection(System.Configuration.Co nfigurationManager.ConnectionStrings.Item("DatabaseConnecti on").ConnectionString)

       Dim adp As New System.Data.SqlClient.SqlDataAdapter("select * from Email where EmailAddress='" & EmailAddresstextbox.Text & "'", con)

       Dim dt As New System.Data.DataTable

       adp.Fill(dt)

       If dt.Rows.Count = 0 Then

           dtbsourceemail.InsertCommandType = SqlDataSourceCommandType.Text

           dtbsourceemail.InsertCommand = "INSERT INTO Email (EmailAddress , IPAddress, DateTimeStamp) VALUES (@EmailAddress, @IPAddress, @DateTimeStamp)"

           dtbsourceemail.InsertParameters.Add("EmailAddress", EmailAddresstextbox.Text)

           dtbsourceemail.InsertParameters.Add("IPAddress", Request.UserHostAddress.ToString)

           dtbsourceemail.InsertParameters.Add("DateTimeStamp", DateTime.Now())

           Dim rowsAffected As Integer = 0

           Try

               rowsAffected = dtbsourceemail.Insert()

           Catch ex As Exception

               Label.Text = "Problem with adding"

           Finally

               dtbsourceemail = Nothing

           End Try

           If rowsAffected <> 1 Then

               Label.Text = "Problem with adding"

           Else

               Label.Text = "Thank you for joining our Mailing list"

           End If

       Else

           Label.Text = "Email Already Exist"

       End If

   End Sub

harshida_19091987 : On September 06, 2008 2:39 AM said:

Unable to download the vedio

ukpatnaik678 : On September 09, 2008 2:20 AM said:

very useful for better understanding the subject.

asplearner2 : On September 11, 2008 12:59 PM said:

Hi,

Without any doubt it is a great tutorial.

But i had an exception while executing the code. Please help. It says Null point exception and the details what i am giving doesn't get saved in the data base.

Please help me as the earliest. Much waiting for your reply.

Thanks in advance

Pakistan : On September 17, 2008 5:53 AM said:

AWESOME

Pakistan : On September 23, 2008 8:25 AM said:

but the code??????

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities