Hi Everyone, I have a BIG problem right now. I am currently learning ASP.NET to fulfil my job role, as an IT Manager. Although I have programming experience in other languages, I have never done ASP.NET before. I am currently working on a website called [snipped]. I recently uploaded the website to a web host, but there seems to be a problem with the website. I have been trying to sort this problem out for over a week now, and it could be something small but it could also be something big. I have contacted the new web host on …

Member Avatar
Member Avatar
+0 forum 3

What is the problem with the following login code? [code] Dim conn As SqlCommand = New SqlCommand("Data Source=RAHUL-034890AF0\SERVER2005;Initial Catalog=user_accounts;Integrated Security=True") conn.Prepare() Dim command As Data.SqlClient.SqlCommand = New Data.SqlClient.SqlCommand("select", conn.Connection) command.Parameters(1).Value = txtusername.Text command.Parameters(2).Value = txtpass.Text Dim i As Integer = command.ExecuteNonQuery conn.BeginExecuteNonQuery() If Page.IsValid Then Response.Redirect("~/salesbill.aspx") Else Lblerror.Text = "Username and password do not match" End If conn.Dispose() [/code] I have tested the query and it works fine. The following is the error, which seems to be related to prepare statement. Im using SQL2005 and Vwd2008. The following is the error page: Object reference not set to an instance of …

Member Avatar
Member Avatar
+0 forum 3

The End.