Ask a Question related to Dreamweaver AppDev, Design and Development.
-
pat luton #1
Retrieving individual data
Hi am trying to retrieve indivual data from a database and i keep getting the
following error.
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
The following code is for verifying the user logged in
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99098932\project\project.md b;"
username=trim(request.form("Username"))
password=trim(request.form("password"))
If username = "" or password = "" then
reponse.redirect
End If
Set RS= Server.CreateObject("ADODB.Recordset")
RS.Open
foundIt=False
Do Until RS.EOF OR foundIt
If(StrComp(RS("Username"), username, vbTextCompare) =0) Then
foundIt=True
Else
RS.MoveNext
End If
Loop
If Not foundIt Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
response.redirect
End If
If Not(StrComp(RS("password"), password, vbBinaryCompare) = 0) Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redirect
Else Session("Valid") = Request("Username")
Response.Redirect
End If
The code for retrieving individual data is as follows
Set conn1= Server.CreateObject("ADODB.Connection")
conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99098932\project\project.md b;"
'--get statement recordset--
set rs1 = Server.CreateObject ("ADODB.Recordset")
rs1.open "select * from statement WHERE Username='<%=session("Valid")%>'",
conn1
Please somebody help
pat luton Guest
-
retrieving individual record
Hi am trying to retrieve individual record does anyone have a clue how to go about it.The code below retrieves all records in the statement table... -
Retrieving data from (irregular) XML
I am retrieving XML files like the one at the end of this post. I can use xmlParse to create the object and retrieve elements. However I need to... -
Retrieving Updated Data
Hi, I have a Windows application that consumes a web service. The data returned from this service contains product prices, ratings and other... -
retrieving data from website
hi there all, me again... is it possible if you know the layout of a web site, to retrieve data from it? i mean things like a weather site that... -
PHP problem retrieving data
I'm not sure why this isn't working, but it's giving me no output. I have a form which requests email and city to pull up a listing, then Email that... -
Manuel Socarras #2
Re: Retrieving individual data
for the error, check [url]http://aspfaq.com/show.asp?id=2363[/url]
anyway, i'm not clear why do you need the first code segment
pat luton wrote:> Hi am trying to retrieve indivual data from a database and i keep getting the
> following error.
> Microsoft VBScript compilation (0x800A0401)
> Expected end of statement
>
> The following code is for verifying the user logged in
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
> Source=D:\web\projects\99098932\project\project.md b;"
>
> username=trim(request.form("Username"))
> password=trim(request.form("password"))
> If username = "" or password = "" then
> reponse.redirect
> End If
> Set RS= Server.CreateObject("ADODB.Recordset")
> RS.Open
> foundIt=False
> Do Until RS.EOF OR foundIt
> If(StrComp(RS("Username"), username, vbTextCompare) =0) Then
> foundIt=True
> Else
> RS.MoveNext
> End If
> Loop
> If Not foundIt Then
> RS.Close
> Set RS = Nothing
> objConn.Close
> Set objConn = Nothing
> response.redirect
> End If
> If Not(StrComp(RS("password"), password, vbBinaryCompare) = 0) Then
> RS.Close
> Set RS = Nothing
> objConn.Close
> Set objConn = Nothing
> Response.Redirect
> Else Session("Valid") = Request("Username")
> Response.Redirect
> End If
>
> The code for retrieving individual data is as follows
> Set conn1= Server.CreateObject("ADODB.Connection")
> conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
> Source=D:\web\projects\99098932\project\project.md b;"
> '--get statement recordset--
> set rs1 = Server.CreateObject ("ADODB.Recordset")
> rs1.open "select * from statement WHERE Username='<%=session("Valid")%>'",
> conn1
> Please somebody help
>Manuel Socarras Guest



Reply With Quote

