VB6 DataEnvironment - Named Parameters

VB6 DataEnvironment - Named Parameters

Post by Ernes » Sun, 25 Nov 2001 02:21:30



Hi all!

I want to use the DataEnvironment interface for my project devoloping.
I am using VB6.0 SP5 and Oracle 8 with Microsoft OLE DB Provider for Oracle.

Everything works fine till  I have to use the "named parameters" for
commands objects.

When I used "SQL Builder" I set the Prefix Caracters to "["  and the Sufix
Caracters to "]" then in the Criteria column of a field i wrote LIKE [Des]
("Des" intended to be the name of the parameter). The SQL command changed to
"Select .... Where ... LIKE [Des] " but when I made RUN SQL I got out an
error message telling me  "The provider connot derive the parameter
information and SeParameterInfo has not been called !"
and the Parameters page is empty.

If get out from the Query designer(saving the query) and get into again the
Prefix Caracters and the Sufix Caracters are blank.

If I manually write (without using SQL Builder) the query using an unnamed
parameter "?" then I can see a new parameter added to the "Parameters" page
but the "?" is not a named parameter.

I really don't know where I am wrong . Can someone give a hint?

Thanks,
Ernest

 
 
 

VB6 DataEnvironment - Named Parameters

Post by Matheus Peschk » Sun, 25 Nov 2001 04:06:44


I'm not sure about Oracle, but SQL syntax for LIKE is usually in the form:

'SELECT Fields FROM Tables WHERE Field LIKE %Var%'

Hope this helps...


Quote:> Hi all!

> I want to use the DataEnvironment interface for my project devoloping.
> I am using VB6.0 SP5 and Oracle 8 with Microsoft OLE DB Provider for
Oracle.

> Everything works fine till  I have to use the "named parameters" for
> commands objects.

> When I used "SQL Builder" I set the Prefix Caracters to "["  and the Sufix
> Caracters to "]" then in the Criteria column of a field i wrote LIKE [Des]
> ("Des" intended to be the name of the parameter). The SQL command changed
to
> "Select .... Where ... LIKE [Des] " but when I made RUN SQL I got out an
> error message telling me  "The provider connot derive the parameter
> information and SeParameterInfo has not been called !"
> and the Parameters page is empty.

> If get out from the Query designer(saving the query) and get into again
the
> Prefix Caracters and the Sufix Caracters are blank.

> If I manually write (without using SQL Builder) the query using an unnamed
> parameter "?" then I can see a new parameter added to the "Parameters"
page
> but the "?" is not a named parameter.

> I really don't know where I am wrong . Can someone give a hint?

> Thanks,
> Ernest


 
 
 

VB6 DataEnvironment - Named Parameters

Post by SulSy » Wed, 28 Nov 2001 06:17:44


SQL builder is fine but has some wierd stuff.

1) When in the SQl builder use all ? (question marks) for criteria.  Such as
Like ?
2) Remember the order from top to bottom in the grid of the ? (variables)

After you save the command you can right click it and select properties.  On
the properties page select parameters.  You will see a list of question
marks.  Start at the top and click each one, giving each one a name at the
right...  voila...

Now, when you use the command in code the autosense will show you the names
of the parameters.  Also, if you run the command you will see the names in
the prompt.

Hope this helps..

Tim


Quote:> Hi all!

> I want to use the DataEnvironment interface for my project devoloping.
> I am using VB6.0 SP5 and Oracle 8 with Microsoft OLE DB Provider for
Oracle.

> Everything works fine till  I have to use the "named parameters" for
> commands objects.

> When I used "SQL Builder" I set the Prefix Caracters to "["  and the Sufix
> Caracters to "]" then in the Criteria column of a field i wrote LIKE [Des]
> ("Des" intended to be the name of the parameter). The SQL command changed
to
> "Select .... Where ... LIKE [Des] " but when I made RUN SQL I got out an
> error message telling me  "The provider connot derive the parameter
> information and SeParameterInfo has not been called !"
> and the Parameters page is empty.

> If get out from the Query designer(saving the query) and get into again
the
> Prefix Caracters and the Sufix Caracters are blank.

> If I manually write (without using SQL Builder) the query using an unnamed
> parameter "?" then I can see a new parameter added to the "Parameters"
page
> but the "?" is not a named parameter.

> I really don't know where I am wrong . Can someone give a hint?

> Thanks,
> Ernest

 
 
 

1. VB6: DataEnvironment-Command: Can't create parameter query

*Crosspost to all vb database newsgroups*

Hi!

I saw in VB6 there is this new way cool and way timesaving new thing: THe DataEnvironment.
great!, but... when I create a command on a connection, and I want to create a parameter
query using the sqlbuilder, it doesn't understand the parameters, even if I set the
parameter prefix and suffix correct. So it's not possible for me now to use
parameterdriven commands, and the DE is then rather useless :(

has anybody had the same problem? is there a way to create these parameterqueries
? The help doesn't say much about this subject, and if I define a parameter with
prefix % and suffix %, and type under criteria: =%MyVar% it can't do it.. It's not
appearing under parameters :(

I use an ODBClink to an access97 database as connection.

Please help ! :)

Thanks!

    FB

2. pgsql/src/backend/utils/misc guc-file.l

3. VB6 Dataenvironment Parameters

4. Restore the Master Database

5. DataEnvironment - Named Parameters

6. How get RAISERROR text in parent stored proc?

7. VB6-SP3 DataEnvironment w/SQL7 ODBC Lags?

8. Page Up/Down in 4GL forms?

9. Unable to update joined table using DataEnvironment in VB6

10. VB6 : DataEnvironment

11. VB6's DataEnvironment Window Connection to Oracle8i Not Complete

12. VB6 Dataenvironment & Datareport

13. VB6 DataEnvironment and Oracle *URGENT*