Ask a Question related to ASP.NET General, Design and Development.
-
Søren Jensen #1
Accessing data on a SQL-server
I want to make an Aspx-page, where a user can enter a
username and a loginname.
I have create all parts execpt for the databaseconnection.
what I want to do is:
1) Create SQL-statement (like: Select * from userTBL
where username=input and password=input)
2) Open the connection and test if there is a record.
3) If so, the user can login to the system.
Can someone show me the simple sourcecode, since I am
beginning to be tired of not being able to solve this
problem.
Best regards and greetings from Denmark.
Søren
Søren Jensen Guest
-
Accessing XMLConnector's data
Hi there, Pls kindly help me with a XMLConnector's problems. I have an XML file successfully read into XMLConnector as following: results:XML... -
Accessing data from an MS Access database on a remote web server
Please forgive me if I have posted this to the wrong group! I have written a VB6 application that works fine. With that said, I would like to add... -
Accessing SQL-Server data in XML
Dear all, i want to access the the data from ms-sql-server2000 to xml file using asp so my code is as <%@ Language=VBScript %> ... -
Accessing the XML Connector Data
Once I have XML data loaded and a XML schema loaded.... how is the data accessed(pathed) in ActionScript? Binding the data to other v2 components... -
Accessing Data
Hi Friends, Is there a way to access data from a website that displays its data from a database. For example if i visit... -
dave wanta #2
Re: Accessing data on a SQL-server
you mean like this?
(off the top of my head )
string connectionString = "{my db connection string here}";
string sqlText = "Select count(*) from userTBL where username=input and
password=input";
SqlCommand cmd = new SqlCommand( sqlText, new SqlConnection(
sqlConnection ) );
cmd.Connection.Open();
int records = int.Parse( cmd.ExecuteScalar().ToString() );
cmd.Connection.Close();
if( records > 0 ){
//user exists
}
else{
//no user exists
}
hth,
Dave
[url]www.aspNetEmail.com[/url]
"Søren Jensen" <soren_a_28@hotmail.com> wrote in message
news:015101c34267$86707ed0$a501280a@phx.gbl...
I want to make an Aspx-page, where a user can enter a
username and a loginname.
I have create all parts execpt for the databaseconnection.
what I want to do is:
1) Create SQL-statement (like: Select * from userTBL
where username=input and password=input)
2) Open the connection and test if there is a record.
3) If so, the user can login to the system.
Can someone show me the simple sourcecode, since I am
beginning to be tired of not being able to solve this
problem.
Best regards and greetings from Denmark.
Søren
dave wanta Guest



Reply With Quote

