Click here to get back home

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

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Different result from query made in mysql-front and from ASP Brian Bendtsen 06-08-2006
Get Chitika Premium
Posted by Brian Bendtsen on June 8, 2006, 7:51 am
Please log in for more thread options
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

Posted by Brian Bendtsen on June 9, 2006, 2:58 am
Please log in for more thread options
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

Similar ThreadsPosted
prefixing a query result September 18, 2006, 10:07 am
getting the last result May 26, 2006, 12:11 pm
return result set in SPs August 23, 2005, 1:37 am
mysql damage result set June 12, 2006, 6:42 am
how to get result set from calling procedure? August 15, 2006, 5:39 am
Adding GROUP BY empties the result set? November 12, 2005, 12:17 pm
Query help: Get category and number of items in one query June 25, 2005, 1:36 am
Update query needed - on a "group by" query - Possible / How??? January 22, 2006, 3:43 pm
Help with an SQL query? September 4, 2005, 1:43 pm
Query help November 2, 2005, 12:31 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap