Problem with VB6, Ole DB and Oracle
From: Marco Salacone <muflo_at_flashnet.it>
Date: Sat, 3 Apr 1999 00:52:35 +0200
Message-ID: <7e3hol$gt8$1_at_news.flashnet.it>
Hi all,
I want to define a command in VB6 that executes a parametric query. Say my command is GetName (id as integer). I found that a syntax like that:
Date: Sat, 3 Apr 1999 00:52:35 +0200
Message-ID: <7e3hol$gt8$1_at_news.flashnet.it>
Hi all,
I want to define a command in VB6 that executes a parametric query. Say my command is GetName (id as integer). I found that a syntax like that:
select name from person where id = ? has no problem if I call:
GetName(123). I get the name of person with id = 123 But if my command is GetName (surname as string) and query is:
select name from person where surname = ?
I have an error from VB (number 3708: Bad parameter...).
It seems as if question mark (?) is good for numeric parameters but not for
string one. I forgot to write that I choose adChar for datatype and String
for host datatype. Any advice?
Do you know if it is possible to write a parametric query like that?:
select id from ?
Thanks Received on Sat Apr 03 1999 - 00:52:35 CEST