473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to connect my ASP.NET using c# with Microsoft sql server 2000?

When i click this button connection should establish ...
my coding is
Expand|Select|Wrap|Line Numbers
  1.  protected void Button1_Click(object sender, EventArgs e)
  2.     {
  3.         cn.Open();
  4.         cmd.Connection = cn;
  5.  
  6.             cmd.CommandText = "select user,pass from register where user_id='" & TextBox1.Text & "' and password='" & TextBox2.Text & "'";
  7.             s = cmd.ExecuteReader();
  8.             If s.Read(); Then
  9.                 Response.redirect("Login.aspx");
  10.             Else
  11.                 Response.Write("invalid username or password");
  12.             End If
  13.  
  14.         cn.Close();
  15.  
  16. }
Feb 2 '11 #1
3 1922
Markus
6,050 Expert 4TB
So, what is your question?
Feb 2 '11 #2
was my coding correct if so what i have to do next .. if my coding is wrong where i have to change my coding
Feb 2 '11 #3
Markus
6,050 Expert 4TB
Well, does it work?
Feb 2 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Julie | last post by:
We have forms written in Visual Basic 6.0. They were previously written for an Access database which was moved to SQL Server 2000. Here's the connect string I used:...
0
by: Hong Kong Is A Good Place | last post by:
how can i connect my sql server 2000 to Adaptive Sybase Server 11.5 and 12.0? Thx.
1
by: elpico | last post by:
Hi there, I've only recently started a project using sql server 2000 for the first time. One of the considerations we have to take is that we need to continuously age/purge data from a couple of...
1
by: Kodo | last post by:
topic. Can the VB.NET standard 2003 version connect to SQL server 2000 from within the IDE. I read reviews on the software that said that it couldn't. I would like to confirm this. Here is a...
2
by: hisham123 | last post by:
I need to Format the number 123.745817 to 123.75 by using Sql Server 2000 Query
3
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
Last week I asked a question about connection to database from client machine (developer machine). I have changed the database security setup for "SQL Server and Windows" under (local)Windows NT...
8
by: jojo41300000 | last post by:
Hi, I have a problem with database connection to SQL server 2000 from ASP.NET. When I try to connect, it give me the errors. But, When I try to connect to SQL SERVER 2005. It works fine. ...
1
by: RubyRed | last post by:
Using SQL Server 2000. Basically, I am trying to calculate each minute of an employee scheduled time during their work shift. In the table below shows only the times that the shift begin...
2
by: varunkumarid | last post by:
Hai to all, i am new to VB.net 2005, I have difficult to connect the SQL server 2000 to VB.net 2005... If You know how to connect the SQL 2000 and VB.net 2005,please Insist to me Quickly....
3
by: shobhitguptait | last post by:
How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000 Hello All...i m really grate full to c such a website where developers try to help people like us who face problems...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.