User Profile

Collapse

Profile Sidebar

Collapse
SimonJ621
SimonJ621
Last Activity: Nov 12 '07, 02:14 PM
Joined: Aug 2 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • SimonJ621
    replied to db2_columns trouble
    in PHP
    I attempted to change the column name, but the result was the same. Thank you for the suggestion.

    Well, I didn't figure out how to use db2_columns correctly, but I'm under a time constraint so the following is my work-around to grab the number of columns and the column names:

    [PHP]$dbconn = db2_pconnect($d bname, $username, $password);

    if ($dbconn) {
    $sql = "SELECT * FROM TABLE1 FETCH FIRST...
    See more | Go to post

    Leave a comment:


  • SimonJ621
    replied to Return columns using db2_columns() via PHP
    in DB2
    Well, I didn't figure out how to use db2_columns correctly, but I'm under a time constraint so the following is my work-around to grab the number of columns and the column names:

    [PHP]$dbconn = db2_pconnect($d bname, $username, $password);

    if ($dbconn) {
    $sql = "SELECT * FROM TABLE1 FETCH FIRST 1 ROWS ONLY";
    $stmt = db2_prepare($db conn, $sql);
    $db2_execute($s tmt);

    ...
    See more | Go to post

    Leave a comment:


  • SimonJ621
    started a topic db2_columns trouble
    in PHP

    db2_columns trouble

    Hi,

    I am attempting to retrieve column names from a table in DB2 using php. While I have a valid connection to the database, I cannot get the db2_columns function to return results. I'm very new to using DB2 and would appreciate any help or suggestions. The following is the code I am attempting:

    $con = db2_pconnect($d bname, $username, $password);
    [PHP]
    if ($con) {

    $schema = "%";...
    See more | Go to post

  • SimonJ621
    replied to Select From Db2 W/php Error
    in DB2
    I used db2_connect instead of the odbc functions and it worked find. The following code worked:

    [PHP]$conn = db2_connect($db name, $username, $password);

    if ($conn) {
    $sql = "SELECT * FROM Table1";
    $stmt = db2_prepare($co n, $sql);
    db2_execute($st mt);

    $rows = array();
    $i = 0;

    while (db2_fetch_row( $stmt)) {
    $rows[$i] = db2_result($stm t,...
    See more | Go to post

    Leave a comment:


  • SimonJ621
    started a topic Return columns using db2_columns() via PHP
    in DB2

    Return columns using db2_columns() via PHP

    Hi,

    I am attempting to retrieve column names from a table in DB2 using php. While I have a valid connection to the database, I cannot get the db2_columns function to return results. I'm very new to using DB2 and would appreciate any help or suggestions. The following is the code I am attempting:

    $con = db2_pconnect($d bname, $username, $password);
    [PHP]
    if ($con) {

    $schema = "%";...
    See more | Go to post

  • SimonJ621
    replied to Select From Db2 W/php Error
    in DB2
    The datasource tests ok. I have the DB2 client on my Windows machine but the server itself runs on a UNIX box.
    See more | Go to post

    Leave a comment:


  • SimonJ621
    started a topic Select From Db2 W/php Error
    in DB2

    Select From Db2 W/php Error

    I am trying to select from a DB2 database with PHP. To my knowledge, the connection is being made, but the select statement won't run. The following is the error I receive:



    I can't find much help online, which is why I am posting here. Any help would be much appreciated as I have never attempted to use DB2. Following is my PHP code:

    [PHP]<?php

    function dbconnect($verb ose) {
    ...
    See more | Go to post

  • SimonJ621
    started a topic SELECT FROM DB2 with PHP
    in PHP

    SELECT FROM DB2 with PHP

    I am trying to select from a DB2 database with PHP. To my knowledge, the connection is being made, but the select statement won't run. The following is the error I receive:



    I can't find much help online, which is why I am posting here. Any help would be much appreciated as I have never attempted to use DB2. Following is my PHP code:

    [PHP]<?php

    function dbconnect($verb ose) {
    ...
    See more | Go to post

  • SimonJ621
    replied to running a web page from python
    Dirty, yes... I'm just curious at this point what happens. It's been a while since I've been able to crash a system :) I'll PM you the results when I test it.
    See more | Go to post

    Leave a comment:


  • SimonJ621
    replied to running a web page from python
    Well... there really isn't a homepage in this application. I am using a browser to send an http xml request, but I'm calling that browser from another program (Business Objects Data Quality). This is to build a prototype to test how some data reacts to the same transforms that are being used in an earlier project, not the actual process flow. This page will be requested about 10,000 times from Business Objects in a only a few minutes. We'll see if...
    See more | Go to post

    Leave a comment:


  • SimonJ621
    replied to running a web page from python
    Thanks for the reply and suggestion. My temporary solution (very similar to your suggestion) is to run window.close when the xml http response comes back. The code looks like this:
    Code:
        function XMLResults(){
          if(request.readyState == 4){
            if(request.status == 200){
              // var strText = request.responseText;
              // document.getElementById("confirmation").innerHTML = strText;
    ...
    See more | Go to post

    Leave a comment:


  • SimonJ621
    started a topic running a web page from python

    running a web page from python

    Hi all,

    I have an python application that I would like to use to send some data to a web page. I am sending this data via url encoding to pass some variables to the page. While I can get the server side to process the data on the web page I'm sending data to, I can't get the javascript to execute. Here are the two things I have tried:

    A)
    Code:
    import urllib
    # Send a 'GET' request to protoSender
    data =
    ...
    See more | Go to post
No activity results to display
Show More
Working...