Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Unspecified Error


Message #1 by "Colin Gallagher" <colinfgallagher@h...> on Wed, 30 Oct 2002 02:05:29
I am trying to execute a simple SQL query.

The code looks like this:

<%
qryEmployees = "SELECT * FROM tblEmployee WHERE Position = 'Hotline 
Receptionist';"

Set objRS = objConn.Execute(qryEmployees)
%>

When I try and open the page, I get an "Unspecified Error" Message.

I think the problem has something to do with the field 'Position' being a 
lookup column, with values that I have pre-entered.  I say this because if 
I take out the WHERE statement, or if I use a WHERE statement like "WHERE 
Fname = 'whatever'", the page displays properly.

I would really appreciate any help you can give me.

Thanks
Message #2 by "Shawn Clabough" <shawnc@u...> on Thu, 31 Oct 2002 00:55:15
Try 

qryEmployees = "SELECT * FROM tblEmployee WHERE [Position] = 'Hotline 
Receptionist';"


> I am trying to execute a simple SQL query.

> The code looks like this:

> <%
q> ryEmployees = "SELECT * FROM tblEmployee WHERE Position = 'Hotline 
R> eceptionist';"

> Set objRS = objConn.Execute(qryEmployees)
%> >

> When I try and open the page, I get an "Unspecified Error" Message.

> I think the problem has something to do with the field 'Position' being 
a 
l> ookup column, with values that I have pre-entered.  I say this because 
if 
I>  take out the WHERE statement, or if I use a WHERE statement 
like "WHERE 
F> name = 'whatever'", the page displays properly.

> I would really appreciate any help you can give me.

> Thanks
Message #3 by "Larry Woods" <larry@l...> on Wed, 30 Oct 2002 19:13:55 -0700
Check the table definition for the lookup field.  My guess that
it is defined as 'number'.  You will have to select on the
number, not the displayed value.  If the lookup field was created
using the values from another table then you could define a join
to get the appropriate value.

Larry Woods


> -----Original Message-----
> From: Colin Gallagher [mailto:colinfgallagher@h...]
> Sent: Wednesday, October 30, 2002 2:05 AM
> To: Access ASP
> Subject: [access_asp] Unspecified Error
>
>
> I am trying to execute a simple SQL query.
>
> The code looks like this:
>
> <%
> qryEmployees = "SELECT * FROM tblEmployee WHERE
> Position = 'Hotline
> Receptionist';"
>
> Set objRS = objConn.Execute(qryEmployees)
> %>
>
> When I try and open the page, I get an "Unspecified
> Error" Message.
>
> I think the problem has something to do with the field
> 'Position' being a
> lookup column, with values that I have pre-entered.  I
> say this because if
> I take out the WHERE statement, or if I use a WHERE
> statement like "WHERE
> Fname = 'whatever'", the page displays properly.
>
> I would really appreciate any help you can give me.
>
> Thanks
>

Message #4 by "Colin Gallagher" <colinfgallagher@h...> on Thu, 31 Oct 2002 19:45:38
Thanks Shawn, that took care of the problem!!!



> Try 

> qryEmployees = "SELECT * FROM tblEmployee WHERE [Position] = 'Hotline 
R> eceptionist';"

> 
>>  I am trying to execute a simple SQL query.

> > The code looks like this:

> > <%
q> > ryEmployees = "SELECT * FROM tblEmployee WHERE Position = 'Hotline 
R> > eceptionist';"

> > Set objRS = objConn.Execute(qryEmployees)
%> > >

> > When I try and open the page, I get an "Unspecified Error" Message.

> > I think the problem has something to do with the field 'Position' 
being 
a>  
l> > ookup column, with values that I have pre-entered.  I say this 
because 
i> f 
I> >  take out the WHERE statement, or if I use a WHERE statement 
l> ike "WHERE 
F> > name = 'whatever'", the page displays properly.

> > I would really appreciate any help you can give me.

> > Thanks

  Return to Index