Click here to Skip to main content
15,909,373 members
Home / Discussions / Database
   

Database

 
GeneralNeed help do design the table for this requirement Pin
percyvimal2-Oct-04 6:44
percyvimal2-Oct-04 6:44 
GeneralRe: Need help do design the table for this requirement Pin
Colin Angus Mackay2-Oct-04 7:00
Colin Angus Mackay2-Oct-04 7:00 
GeneralRe: Need help do design the table for this requirement Pin
percyvimal2-Oct-04 7:14
percyvimal2-Oct-04 7:14 
GeneralRe: Need help do design the table for this requirement Pin
Colin Angus Mackay2-Oct-04 7:52
Colin Angus Mackay2-Oct-04 7:52 
GeneralRe: Need help do design the table for this requirement Pin
percyvimal2-Oct-04 8:25
percyvimal2-Oct-04 8:25 
GeneralRe: Need help do design the table for this requirement Pin
Colin Angus Mackay2-Oct-04 8:59
Colin Angus Mackay2-Oct-04 8:59 
QuestionMark DataTable column so changes do not affect RowState? Pin
DrGerry1-Oct-04 12:09
DrGerry1-Oct-04 12:09 
GeneralCheck for syntax Pin
macupryk30-Sep-04 21:16
macupryk30-Sep-04 21:16 
<%@ Page CompilerOptions='/R:"C:\Program
Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"'%>
<%@ import namespace="System.Web.UI" %>
<%@ import namespace="System.Web.SessionState" %>
<%@ import namespace="System.Web" %>
<%@ import namespace="System.Drawing" %>
<%@ import namespace="System.ComponentModel" %>
<%@ import namespace="System.Collections" %>
<%@ import namespace="System.Text" %>
<%@ import namespace="System.Data" %>
<%@ Import Namespace="Microsoft.Data.Odbc" %>
<%@ Register TagPrefix="mspos" TagName="header"
Src="~/Engine/Controls/header.ascx" %>
<%@ Register TagPrefix="mspos" TagName="footer"
Src="~/Engine/Controls/footer.ascx" %>


<title>




bool CustomAutenticate (string username, string password)
{
OdbcCommand objcmd;
OdbcConnection oConn;
OdbcDataReader objreader;

string strSQL ="select * from TBUSERS where USERNAME='" + username +
"' and PASSWD='" + password + "'";
string sConnString = "DSN=POS;UID=system;PWD=system";

OdbcConnection myConn = new OdbcConnection(sConnString);
OdbcCommand myCmd = new OdbcCommand(strSQL, myConn);
OdbcDataReader dr = null;
try
{
myConn.Open();
dr = myCmd.ExecuteReader();
if(dr.Read()) {
if(dr.GetString(0).Trim() == username.Trim()) {
FormsAuthentication.RedirectFromLoginPage(username,
false);
return(true);
}
else
Output.Text = "Sorry! Your login or password is
incorrect. <br>Please log in again.";
}
else
{
Output.Text = "Sorry! Your login or password is incorrect.
<br>Please log in again.";
}
}
catch(Exception myException) {
Response.Write("Oops. The error: " + myException.Message);
}
finally {
myConn.Close();
}
return false;
}

void OnSubmit (Object sender, EventArgs e)
{
bool Check=false;
Check=CustomAutenticate;
if (Check == true)
Response.Redirect("default.aspx");
}




<mspos:header id="Header1" runat="server">
 



Please
Enter your Username and Password



 


  User Login
User
Name:


<asp:textbox id="UserName" runat="server"
textmode="SingleLine" maxlength="32" width="150px">
Password:

<asp:textbox id="Password" runat="server"
textmode="Password" maxlength="40" width="150px">
 
<asp:button text="Submit" onclick="OnSubmit"
runat="server" id="Button"> 



<asp:label id="Output" runat="server">




GeneralRe: Check for syntax Pin
Colin Angus Mackay1-Oct-04 1:24
Colin Angus Mackay1-Oct-04 1:24 
GeneralI need to Create a User Login and Registration Webform in Oracle and ODBC Pin
macupryk30-Sep-04 21:15
macupryk30-Sep-04 21:15 
QuestionCan we bind all these three to one connection Pin
macupryk30-Sep-04 21:14
macupryk30-Sep-04 21:14 
GeneralPassing a var to a SP.. Pin
Jacob Hammack30-Sep-04 15:32
Jacob Hammack30-Sep-04 15:32 
GeneralRe: Passing a var to a SP.. Pin
Christian Graus30-Sep-04 16:30
protectorChristian Graus30-Sep-04 16:30 
GeneralRe: Passing a var to a SP.. Pin
Jacob Hammack30-Sep-04 20:22
Jacob Hammack30-Sep-04 20:22 
GeneralRe: Passing a var to a SP.. Pin
Colin Angus Mackay1-Oct-04 0:26
Colin Angus Mackay1-Oct-04 0:26 
GeneralBeginner OLE question Pin
errenden30-Sep-04 10:01
errenden30-Sep-04 10:01 
GeneralRe: Beginner OLE question Pin
ThomasH13-Oct-04 12:58
ThomasH13-Oct-04 12:58 
GeneralRe: Beginner OLE question Pin
errenden4-Oct-04 5:23
errenden4-Oct-04 5:23 
GeneralRe: Beginner OLE question Pin
ThomasH14-Oct-04 13:04
ThomasH14-Oct-04 13:04 
GeneralRe: Beginner OLE question Pin
errenden5-Oct-04 3:59
errenden5-Oct-04 3:59 
GeneralTransaction SQL help (SQL Server 2000) Pin
Matt Newman30-Sep-04 6:31
Matt Newman30-Sep-04 6:31 
GeneralRe: Transaction SQL help (SQL Server 2000) Pin
Colin Angus Mackay30-Sep-04 7:19
Colin Angus Mackay30-Sep-04 7:19 
GeneralRe: Transaction SQL help (SQL Server 2000) Pin
Matt Newman30-Sep-04 7:27
Matt Newman30-Sep-04 7:27 
GeneralRe: Transaction SQL help (SQL Server 2000) Pin
Colin Angus Mackay30-Sep-04 9:51
Colin Angus Mackay30-Sep-04 9:51 
GeneralRe: Transaction SQL help (SQL Server 2000) Pin
Matt Newman30-Sep-04 10:31
Matt Newman30-Sep-04 10:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.