Hi guys,
This is my query.
I have a login page (login.asp) which uses standard Dreamweaver MX 2004 login feature. The username gets stored in a session variable MM_Username
THis session variable gets carried forward to a basic list page which has hyperlinks to get more detail. I can see the session variable in this 3rd page - detaillist.asp.
On the detaillist.asp page I want to now get the userid based on the username stored in the MM_Username variable.
Code is:
<%
Dim UserID
Set UserID = Server.CreateObject("ADODB.Recordset")
UserID.ActiveConnection = MM_LocalSQL_STRING
UserID.Source = "SELECT lgClients.ID FROM dbo.lgClients WHERE dbo.lgClients.Username = " + Replace (Detail_query__MMUsername, "'", "''") + " "
UserID.CursorType = 0
UserID.CursorLocation = 2
UserID.LockType = 1
UserID.Open()
%>
It throws a Microsoft
VB Script compilation (0x800A03EA) Syntax error
Its the + Replace bit thats sick...