Different result from query made in mysql-front and from ASP

Different result from query made in mysql-front and from ASP

am 08.06.2006 13:51:31 von Brian Bendtsen

Hi

I have a strange problem with a mysql database and ASP.

I try to retrieve a value from a table I have just created with a very
simple sql statement.

Ex. SELECT myValue FROM myTable WHERE userID = 'myName'

If I type the query in mysql-front it works fine but if I execute it
from and ASP page I get no value.

I have tried something similar with other tables in my database without
this problem.

My ASP script looks like this:
<%
sql = "SELECT * FROM t_organisation_salg WHERE brugerID = '10025'"
set objRS = objConn.execute(sql)

IF NOT objRS.EOF THEN response.write objRS("omsaetning_gruppe")

objRS.close
set objRS=nothing
objConn.close
set objConn = nothing
%>

My database connection is included from another file.

Can anybody help?

/Brian

Re: Different result from query made in mysql-front and from ASP

am 09.06.2006 08:58:24 von Brian Bendtsen

Brian Bendtsen wrote:
> Hi
>
> I have a strange problem with a mysql database and ASP.
>
> I try to retrieve a value from a table I have just created with a very
> simple sql statement.
>
> Ex. SELECT myValue FROM myTable WHERE userID = 'myName'
>
> If I type the query in mysql-front it works fine but if I execute it
> from and ASP page I get no value.
>
> I have tried something similar with other tables in my database without
> this problem.
>
> My ASP script looks like this:
> <%
> sql = "SELECT * FROM t_organisation_salg WHERE brugerID = '10025'"
> set objRS = objConn.execute(sql)
>
> IF NOT objRS.EOF THEN response.write objRS("omsaetning_gruppe")
>
> objRS.close
> set objRS=nothing
> objConn.close
> set objConn = nothing
> %>
>
> My database connection is included from another file.
>
> Can anybody help?
>
> /Brian

Hi
I found out that if I change the fields with type decimal to type double
it works. Has anyone experienced this problem before?

/Brian