Skip site navigation (1) Skip section navigation (2)

Re: How to insert data pass by parameter

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: <usanee(at)mfec(dot)co(dot)th>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: How to insert data pass by parameter
Date: 2007-08-10 05:53:17
Message-ID: 068701c7db12$bfd04460$c601a8c0@HP22720319231 (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc

From: <usanee(at)mfec(dot)co(dot)th>

> Hi support
>             I have problem about insertion into postgres db and details
> like below;
> 1. I use IBM DataStage as client connect to Postgrest db 8.2.4 via
> psqlOdbc  8.0.4
> 2. I can read data from table but I cannot insert data in to target table
> on Postgrest DB and I 've got error message like this
>         "SQL statement:INSERT INTO a(emp_id) VALUES (?)
> [DataStage][SQL Client][ODBC][unixODBC]Error while executing the query
> (non-fatal);
> ERROR:  syntax error at end of input at character 47 "

I do not use IBM Datastage...
However, For example, a parameter can be used as follows. 

    Set cmd = New ADODB.Command
    cmd.ActiveConnection = cn
    cmd.CommandText = "insert into MYTABLE(main,object) values(?,?)"
    cmd.CommandType = adCmdText

    ' The main parameter
    Set main = cmd.CreateParameter("main", adInteger, adParamInput)
    main.Value = 100 '' a random integer value ''
    cmd.Parameters.Append main

I want this to be help you.

Hiroshi Saito

In response to

pgsql-odbc by date

Next:From: Hiroshi SaitoDate: 2007-08-10 06:05:40
Subject: Re: 32 bit ODBC driver for PostgreSQl
Previous:From: Hiroshi SaitoDate: 2007-08-10 01:16:19
Subject: Re: ODBC driver adding extra characters to table names.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group