Websql Problem with returning data

Websql Problem with returning data

Post by Jermaine Lindsa » Wed, 14 May 1997 04:00:00



I am working with WebSql and I am having the following problem.
I am expecting the results to be returned within the browser but instead
it tries to print our the perl script. If I comment out the  block of
code marked with '#' then it return the data in the browser. Could
anyone tell me why this block is causing it to try to save the file to
the disk.

The code is

   $rc = ct_sql($ws_db, "$procedure");
   if ($rc != CS_SUCCEED) {ws_error("ct_sql() failed");}

   while ($ret=ct_results($ws_db, $result_type) == CS_SUCCEED)
        {
        if ($result_type == CS_ROW_RESULT)
           {
                print "<TABLE BORDER>\n";

                {

                   elseif (result_type == CS_STATUS_RESULT)
                   {
#                     $status = ct_fetch ($ws_db);
#                     ct_fetch ($ws_db);
#                  }
#                  else {
#                     ws_error ("Unexpected result type returned from SQL"); }
                   }
                print "</TABLE>\n";
           }
        }
print qq!

   </BODY>
   </HTML>
   !;
  }

 
 
 

Websql Problem with returning data

Post by Jermaine Lindsa » Wed, 14 May 1997 04:00:00


Hello,

I would like to thank you for you help and apologize for bothering you
again. The code that I dentered now makes the process try to save the
data to the disk when I want to return it int he browser.
What can I do to stop this from trying to save the file to the disk?

This is also related to the first post regarding unwanted error message
that I am trying to get rid of by putting in that black of code


> I am working with WebSql and I am having the following problem.
> I am expecting the results to be returned within the browser but instead
> it tries to print our the perl script. If I comment out the  block of
> code marked with '#' then it return the data in the browser. Could
> anyone tell me why this block is causing it to try to save the file to
> the disk.

> The code is

>    $rc = ct_sql($ws_db, "$procedure");
>    if ($rc != CS_SUCCEED) {ws_error("ct_sql() failed");}

>    while ($ret=ct_results($ws_db, $result_type) == CS_SUCCEED)
>         {
>         if ($result_type == CS_ROW_RESULT)
>            {
>                 print "<TABLE BORDER>\n";

>                 {

>                    elseif (result_type == CS_STATUS_RESULT)
>                    {
> #                     $status = ct_fetch ($ws_db);
> #                     ct_fetch ($ws_db);
> #                  }
> #                  else {
> #                     ws_error ("Unexpected result type returned from SQL"); }
>                    }
>                 print "</TABLE>\n";
>            }
>         }
> print qq!

>    </BODY>
>    </HTML>
>    !;
>   }


 
 
 

1. Flaky system() returns in websql

Hello,

        Has anyone else noticed flaky return values coming from system()
calls in WebSQL?

        For example, I'm using the system() call to execute a program
named checkUser.  It looks like this:

        $ck_retcode = system('/usr/local/bin/checkUser', $user);
        open(DBG, ">/tmp/ck");
        print DBG "ck_retcode = $ck_retcode";
        close(DBG);

Now, I've added debug code to the checkUser program which proves to me
that it's running everytime and returning a status of 5 everytime.
But, in my WebSQL program, I sometimes see the 5 being returned
(actually, 5 * 256) and sometimes I see -1.  (FWIW, this is a .hts
file)

        It's the -1 that worries me.  Remember, the system call is always
succeeding as I can see from checkUser's debug file.  I can also see
that a status of 5 is always being returned.  (Yes, I've deleted the
debug log file between runs.)

        Any ideas?  Any similar experiences?

        --Craig

_____________________________________________
Craig Kickel             | (208) 368-1417

Micron Internet Services |
_____________________________________________

2. NJ-Other-254157--System Analysis-UNIX-Shell Prog. Lang-C-C++-ORACLE-MS ACCESS-PL

3. websql: ct_results() returns 4040

4. drill through to data base from cubes

5. Problem using ct_sql with websql

6. Values List Parameter

7. Websql security problems

8. Convert data SQL Srvr 6.5 to 7.0

9. websql installation problems

10. FYI, problem with duplicate inserts and with no data returned

11. Returning (or not returning) data from an SP

12. this command did not return data, and it did not return any rows

13. problem using return value and data from sp