pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Campbell, Greg <greg.campbell@us.michelin.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Postgre and Visual Basic
Date: Tue, 07 Mar 2006 11:25:39 -0500
Message-ID: <440DB403.9090406@us.michelin.com> (raw)
In-Reply-To: <44D9FC40FD695B4E85F1C59965C27E0FAA4DF0@man3.free2.local>
References: <44D9FC40FD695B4E85F1C59965C27E0FAA4DF0@man3.free2.local>

 > project.dbScholl.Execute StrSql2 , , adCmdText
First, test the SQL statement in something like the SQL window of pgAdmin.


Then
Is dbScholl a database object (like DAO) or an ADODB.Connection object?
You should understand the difference and select one.

Presuming that you really want ADO,
Are you using liked tables? ..
If so then use something like
    CurrentProject.Connection.Execute StrSql2
If not linked tables then use something like
   Dim cnn as new ADODB.Connection
   cnn.Open "DSN=my_dbs_dsn_name" 'or a full PostgreSQL connection string to save a trip to the registry
   cnn.Execute StrSql2




Tim Clarke wrote:
> To debug this sort of issue, take VB out of the picture: once it has
> processed the line creating StrSql2 for you, run the SQL directly in
> Postgres via some other method (we use pgAdmin) and make sure that code
> is OK. Then you'll know whether this is a VB or a Postgres issue.
> 
> Tim Clarke
> 
> -----Original Message-----
> From: dodol garut [mailto:jangkaru80@yahoo.com] 
> Sent: 07 March 2006 15:24
> To: Tim Clarke
> Subject: Re: [ODBC] Postgre and Visual Basic
> 
> 
> When I insert a reccord from my form in VB, there was an error message
> "no columns defined in rowset"
> 
> and here is my query to insert that reccord:
> dim StrSql2 as string
> StrSql2 = "insert into produk(kodeproduk,namaproduk,hargasatuan)
> values('" & text1.Text & "','" & Text2.Text & "'," & Text3.Text & ");"
> 
> project.dbScholl.Execute StrSql2 , , adCmdText
> 
> thanx before...
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

Attachments:

greg.campbell.vcf (text/x-vcard, 239B) download begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America - US5 Lexington;ENG-ASE email;internet:greg.campbell@us.michelin.com title:ASE Systems Engineer tel;work:803-951-5561/x75561 x-mozilla-html:FALSE version:2.1 end:vcard

view thread (7+ messages)  latest in thread

Message-ID: <440DB403.9090406@us.michelin.com>
Permalink:  ../440DB403.9090406@us.michelin.com/
Also on:    postgresql.org/message-id/440DB403.9090406@us.michelin.com

 · 

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: greg.campbell@us.michelin.com
  Subject: Re: Postgre and Visual Basic
  In-Reply-To: <440DB403.9090406@us.michelin.com>
  References: <44D9FC40FD695B4E85F1C59965C27E0FAA4DF0@man3.free2.local> <440DB403.9090406@us.michelin.com>

* 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