Hi,
i seem to be have the following problem, i get the following error when trying to access my access database.
Warning: SQL error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length, SQL state S1090 in SQLConnect in C:\Inetpub\wwwroot\jpc\jpcprotected\login.php3 on line 11
the dsn file looks like this
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UserCommitSync=Yes
Threads=3
SafeTransactions=0
ReadOnly=1
PageTimeout=5
MaxScanRows=8
MaxBufferSize=4096
FIL=MS Access
DriverId=25
DefaultDir=http://roses/jpc/
DBQ=http://roses/jpc/passw.mdb
the php file looks like this
<head>
<title>login.php3</title>
</head>
<body>
<SCRIPT language ="php">
$UserName=$HTTP_POST_VARS["username"];
$Password=$HTTP_POST_VARS["password"];
$MyConn=odbc_connect("http://roses/jpc/jpcprotected/password.dsn;UID=user;PWD=littlebear","","");
$SQL="Select UserName, Password From tblLogin
_,Where UserName=$UserName,Password=$Password";
$RS_query=odbc_exec($MyConn,($SQL));
$RS_ptr=1;
$RS=odbc_fetch_row($RS_query,$RS_ptr++);
if (!($RS==0))
{
$allow_session=true;
header("Location: "."Default.htm");
exit;
}
else
{
header("Location: "."main.htm");
exit;
odbc_close($MyConn);
$RS=null;
$MyConn=null;
}
</script>
ok where am i going wrong this time?
thanks
rose