pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
To: usanee@mfec.co.th
To: pgsql-odbc@postgresql.org
Subject: Re: How to insert data pass by parameter
Date: Fri, 10 Aug 2007 14:53:17 +0900
Message-ID: <068701c7db12$bfd04460$c601a8c0@HP22720319231> (raw)
References: <46854.203.148.220.220.1186560534.squirrel@203.148.220.220>

Hi.

From: <usanee@mfec.co.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 (?)
> SQLSTATE=00000, DBMS.CODE=-1
> [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.

Regards,
Hiroshi Saito



view thread (2+ messages)

Message-ID: <068701c7db12$bfd04460$c601a8c0@HP22720319231>
Permalink:  ../068701c7db12$bfd04460$c601a8c0@HP22720319231/
Also on:    postgresql.org/message-id/068701c7db12$bfd04460$c601a8c0@HP22720319231

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: z-saito@guitar.ocn.ne.jp, usanee@mfec.co.th
  Subject: Re: How to insert data pass by parameter
  In-Reply-To: <068701c7db12$bfd04460$c601a8c0@HP22720319231>
  References: <46854.203.148.220.220.1186560534.squirrel@203.148.220.220> <068701c7db12$bfd04460$c601a8c0@HP22720319231>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox