G
Guest
How do i use a SQL Server Scalar-valued function in MS Access ADP?
I have a function "fGrantAccess" in the SQL Server Database and i would like
to use it in an Access Project. The function returns a GUID from a table
depending on two parameters: user id and password.
I thought the function would operate in a similar fashion to a view or
table-valued function; however, i was mistaken.
This line's error is "Invalid Object Name"..
rdsStr = "SELECT fGrantAccess FROM dbo.fGrantAccess WHERE (" & _
"(uiLoginId='" & uName.Value & "') AND " & _
"(uiLoginPw='" & uPass.Value & "'));"
rdsADO.Open rdsStr, Application.CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly
ps. i have also tried setting the sql string to
rdsStr = "SELECT fGrantAccess FROM {fn {fGrantAccess('" & uName.Value &
"','" & uPass.Value & "')}};"
Thank you for your help...
I have a function "fGrantAccess" in the SQL Server Database and i would like
to use it in an Access Project. The function returns a GUID from a table
depending on two parameters: user id and password.
I thought the function would operate in a similar fashion to a view or
table-valued function; however, i was mistaken.
This line's error is "Invalid Object Name"..
rdsStr = "SELECT fGrantAccess FROM dbo.fGrantAccess WHERE (" & _
"(uiLoginId='" & uName.Value & "') AND " & _
"(uiLoginPw='" & uPass.Value & "'));"
rdsADO.Open rdsStr, Application.CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly
ps. i have also tried setting the sql string to
rdsStr = "SELECT fGrantAccess FROM {fn {fGrantAccess('" & uName.Value &
"','" & uPass.Value & "')}};"
Thank you for your help...