Re: How do I "Insert" using a type member? - Mailing list pgsql-general

From John Steely
Subject Re: How do I "Insert" using a type member?
Date
Msg-id 36FC6074.B15AF038@home.com
Whole thread Raw
In response to How do I "Insert" using a type member?  ("Ty Augustine" <tya@home.com>)
List pgsql-general
Ty,
    You were on the right track.  I'm assuming this is a string in your VB
app; if so, just quote the rest of the strings:

SQL = "Insert SoftwarePackage(Name,Path,Size,nFiles) " _
    & "value ('" & sw.cName & "', '" _
    & sw.cPath & "', '" _
    & sw.sSize & "', '" _
    & sw.hFiles & "')"
Just make sure Size and nFiles are char/varchar fields.

HTH
John Steely
DaVinci TWG


Ty Augustine wrote:
>
> Hi,
> I'm a newbie to VB and SQL.  I have VB6 and SQL7.  I'm trying to insert
> Strings that are members of a type into SQL,  This is what i've tried with
> no success.  How do you do this? and how would I do this using a stored
> procedure?
>
> 'SQL = "Insert SoftwarePackage(Name,Path,Size,nFiles) " _
> '   & "Values('" & sw.cName & "'," _
> '   & sw.cPath & "," _
> '   & sw.sSize & "," _
> '   & sw.hFiles & ")"

pgsql-general by date:

Previous
From: "Lynn Gabbay"
Date:
Subject: is there a 'byte' type?
Next
From: Richi Plana
Date:
Subject: Determining if "in a text set"