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

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

Post by Frans Boum » Wed, 09 Sep 1998 04:00:00



*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

 
 
 

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

Post by Tim Ell » Thu, 10 Sep 1998 04:00:00


I agree, though I haven't got to the bottom of it, the Data Environment
is really cool.

I'm using it mostly for SQL Server at the moment, but I just hooked it up
to Access for a play.  One thing you could do, is create a
parameterised query in the database first, and then change Database
object to View, and pick your new query.  This has the advantage of
course, that Access precompiles the query, and should therefore be
faster.


Quote:> 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 :(


 
 
 

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

Post by Frans Boum » Thu, 10 Sep 1998 04:00:00



>I agree, though I haven't got to the bottom of it, the Data Environment
>is really cool.

>I'm using it mostly for SQL Server at the moment, but I just hooked it up
>to Access for a play.  One thing you could do, is create a
>parameterised query in the database first, and then change Database
>object to View, and pick your new query.  This has the advantage of
>course, that Access precompiles the query, and should therefore be
>faster.

    it's an idea indeed. I always assumed that, because there is no
    server, access couldn't have stored procedures, but in fact you use
    stored queries to execute on the client... :) I'll give it a try! thanks!

        FB


>> 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 :(

 
 
 

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

Post by Juergen Schneide » Thu, 10 Sep 1998 04:00:00


I have the same problem and created a parameter query in Access. The problem
is that I cannot update this query because when I do myRecordset.Update , I
get an error message that one parameter is missing. Any ideas ?

TIA,

// Juergen

 
 
 

1. VB6 DataEnvironment - Named Parameters

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

2. Recommendable System for MS SQL?

3. VB6 DataEnvironment->Command ???

4. sqlj translator.zip

5. VB6 Dataenvironment Parameters

6. IN & CONVERT FUNCTIONS WITH SP

7. Trouble passing a parameter to a DataEnvironment command

8. Blank ApplicationName in profiler

9. passing parameters in dataEnvironment command

10. Q: DataEnvironment - Command Parameters

11. DataEnvironment - Changing ADO Command Execute method parameters

12. Passing a time as a DataEnvironment command parameter