On Friday 30 December 2011 21:02:28 Patrick wrote:
> Getting closer.
>
> The following statement works with a postgressql database with the params
> fields set.
>
> Insert into messages (touserid, fromuserid, created, message,
>    replytomessageid) values ($1, $2, $3, $4, $5);
>
> But this does not work with a mysql database.
>
> Insert into messages (touserid, fromuserid, created, message,
>    replytomessageid) values (?, ?, ?, ?, ?);
>
> I get an error of
>
> mysqlDB: Paramtype ftUnknown not supported.
>
> I use the same tmsesqlquery for both databases.  I just change the
> statement depending on which database I use.
>
>
tmsesqlquery is designed for scrollable resultsets. For SQL statements which 
don't return data tsqlresult should be used.
Set <tsqlstatement>.sql to
"
insert into messages (touserid, fromuserid, created, message, 
replytomessageid)
values (:touserid, :fromuserid, :created, :message, :replytomessageid);
"
That will initialize <tsqlstatement>.params, see attachment. Either set 
params[<n>].DataType at design time or params[n].as* at runtime in order to 
define the data type.
For queries which return data tsqlresult can be used.

Martin

<<attachment: tsqlstatement.png>>

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to