SqlExecute and binding
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Tue Nov 17 06:06:00 CST 2009
On 11/17/09 10:41 AM, "Thomas Flemming" <tf at ttqv.com> wrote:
> I've some problems with bindings (with VNET):
>
> Dim a(3) as object
> a(0) = .coo.lat ' double
> a(1) = .coo.lon ' double
> a(2) = .coo.alt ' single
> a(3) = .first_point ' boolean
> a(4) = .coo.datetime ' date
>
> sql As String = "INSERT INTO [mytbl] (lat, lon, alt, fp, date)
> VALUES ( :1, :2, :3, :4, :5)"
> db.SqlExecute(sql, a)
>
> This works somehow, but lat, lon, alt are converted to integer.
> When I declare a(3) as String, then it works.
>
> Still I'm not able to insert into the date-field. If a(4) contains a date,
> then SqlExecute gives an exeption, something like "1,55 ")" expected"
>
> How can I insert into a table with mixed field-types?
V4RB have two methods
"SqlExecute(inQuery as string, inBinds() as String
"SqlExecute(inQuery as string, inBinds() as Variant
You need array of variants
But BIG BIG BIG warning!!
During 4 years I cry to REAL that VARIANT in REALbasic
Is very very slow.
x100 times slower
They do not fix.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list