This topic is locked

6.2 DAL Issue

2/2/2010 5:23:27 PM
ASPRunnerPro General questions
L
Levski author

Hello
I am using 6.2 build 4348 with SQL 2008.
The following code is in BeforeAdd:
*'** Check if specific record exists ****

dim rsExists

set rsExists = dal.Accounts.Query("CardNo='1'","")

if not rsExists.eof then

' if record exists do something
else

' if dont exist do something else
end if

rsExists.Close : set rsExists = Nothing
BeforeAdd=true
But it gives this error:
Microsoft VBScript runtime (0x800A01A8)

Object required: 'dal.Accounts'

/directory/Accounts_add.asp*
Your help would be appreciated.

Sergey Kornilov admin 2/2/2010

For now instead of

set rsExists = dal.Accounts.Query("CardNo='1'","")



you can use

set rsExists = dal.Table("Accounts").Query("CardNo='1'","")


We'll fix this in final version.