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



Tue, 29 Jul 2003 00:35:31 GMT  
 VB6 Access2000 Problem with simple SQL Statement
Could it be that there is a space in the field name?  If I use a field with no
space I get no error.


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
Ok, I'm new to this so I'm learning.  But if you mispell a variable name, the
open method will behave as if it is a parameter.


Tue, 29 Jul 2003 02:30:29 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