VB6 Access2000 Problem with simple SQL Statement 
Author Message
 VB6 Access2000 Problem with simple SQL Statement

This is driving me nuts. I've looked this up and it should work.

    sSQL = "SELECT * FROM Z_Menu WHERE [Menu ID]='hc:str'"

    With rsMnu
        .ActiveConnection = cnnCB
        .CursorType = adOpenForwardOnly
        .CursorLocation = adUseClient
        .LockType = adLockReadOnly
        .Open sSQL
    End With

When I run this I get the following:

    Run-time error '-2147217904 (80040e10)':

    No value given for one or more required parameters.

The table in question is just that, a table.  Not a query of any kind.

Any ideas?  I will check the post here but if you want to email me remove
'remove.'

Buck



Mon, 28 Jul 2003 23:32:01 GMT  
 VB6 Access2000 Problem with simple SQL Statement
This may not be your problem, but your statement

        .ActiveConnection = cnnCB

Assigns the default property, not the actual connection object.

To use an already open connection, do

        Set .ActiveConnection = cnnCB

HTH,
Tore.


Quote:
> This is driving me nuts. I've looked this up and it should work.

>     sSQL = "SELECT * FROM Z_Menu WHERE [Menu ID]='hc:str'"

>     With rsMnu
>         .ActiveConnection = cnnCB
>         .CursorType = adOpenForwardOnly
>         .CursorLocation = adUseClient
>         .LockType = adLockReadOnly
>         .Open sSQL
>     End With

> When I run this I get the following:

>     Run-time error '-2147217904 (80040e10)':

>     No value given for one or more required parameters.

> The table in question is just that, a table.  Not a query of any kind.

> Any ideas?  I will check the post here but if you want to email me remove
> 'remove.'

> Buck



Tue, 29 Jul 2003 01:35:59 GMT  
 VB6 Access2000 Problem with simple SQL Statement
Thanks, I'll try that.


Quote:
> This may not be your problem, but your statement

>         .ActiveConnection = cnnCB

> Assigns the default property, not the actual connection object.

> To use an already open connection, do

>         Set .ActiveConnection = cnnCB

> HTH,
> Tore.



> > This is driving me nuts. I've looked this up and it should work.

> >     sSQL = "SELECT * FROM Z_Menu WHERE [Menu ID]='hc:str'"

> >     With rsMnu
> >         .ActiveConnection = cnnCB
> >         .CursorType = adOpenForwardOnly
> >         .CursorLocation = adUseClient
> >         .LockType = adLockReadOnly
> >         .Open sSQL
> >     End With

> > When I run this I get the following:

> >     Run-time error '-2147217904 (80040e10)':

> >     No value given for one or more required parameters.

> > The table in question is just that, a table.  Not a query of any kind.

> > Any ideas?  I will check the post here but if you want to email me remove
> > 'remove.'

> > Buck



Tue, 29 Jul 2003 01:59:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB6 Access2000 Problem with simple SQL Statement

2. strang problem in simple sql statement

3. VB6 - Problem passing multiple parameters to Command SQL statement

4. Problem with quotes in VB6 SQL statements

5. problems with sql statement using access 2000, ado, vb6

6. Problem with Quotes in VB6 SQL statements

7. SQL string VB6 Access2000

8. Very simple SQL statement???

9. Simple SQL statement?

10. problem with VB6 and Access2000

11. VB6, Access2000 and Win2000 problem

12. Another Problem Using Access2000 MDB files with VB6

 

 
Powered by phpBB® Forum Software