VB & Access on Win2k 
Author Message
 VB & Access on Win2k

Hi all,

I've got an app that runs perfectly on Win95 & 98 but not on Win2k.
Everything seems to work the same except that when i execute the following
query i get an error saying 'too few parameters, expected 1'??

Here is the code that causes the problem:

        Set cnDB = New adodb.Connection
        cnDB.ConnectionString = m_ConString
        cnDB.Open m_ConString, "xxx", "xxx"
        cnDB.CursorLocation = adUseClient

        Set rsDebtor = New adodb.Recordset

        strSql = "SELECT Debtors.DebtorName, Invoices.InvoiceNo
                    AS [Invoice No], Invoices.InvoiceDate AS [Invoice Date],
                    Invoices.InvoiceValue AS [Value], Invoices.[Module],
                    Invoices.ActionDueDate AS [Next Action],
Invoices.InvoiceID,
                    Invoices.InvoiceNotes FROM Debtors INNER JOIN Invoices
                    ON Debtors.DebtorID  = Invoices.DebtorID
                    WHERE (((Debtors.DebtorID)=19));"

    rsDebtor.Open strSql, cnDB, adOpenStatic, adLockOptimistic    <-----
errors here!

Any ideas????

Regards

Dave



Sat, 16 Jul 2005 17:16:58 GMT  
 VB & Access on Win2k
Curious, what is m_ConString equal to and what version of Access are you
usuing?

--
----------------------------------------------------------------------------
-------------------
Clint LaFever
http://vbasic.iscool.net
Home of the Extended ListView (Free)
Edit any subitem with dropdown, textbox, command button, calendar or custom
entry field
Many other features
----------------------------------------------------------------------------
-------------------

Quote:
> Hi all,

> I've got an app that runs perfectly on Win95 & 98 but not on Win2k.
> Everything seems to work the same except that when i execute the following
> query i get an error saying 'too few parameters, expected 1'??

> Here is the code that causes the problem:

>         Set cnDB = New adodb.Connection
>         cnDB.ConnectionString = m_ConString
>         cnDB.Open m_ConString, "xxx", "xxx"
>         cnDB.CursorLocation = adUseClient

>         Set rsDebtor = New adodb.Recordset

>         strSql = "SELECT Debtors.DebtorName, Invoices.InvoiceNo
>                     AS [Invoice No], Invoices.InvoiceDate AS [Invoice
Date],
>                     Invoices.InvoiceValue AS [Value], Invoices.[Module],
>                     Invoices.ActionDueDate AS [Next Action],
> Invoices.InvoiceID,
>                     Invoices.InvoiceNotes FROM Debtors INNER JOIN Invoices
>                     ON Debtors.DebtorID  = Invoices.DebtorID
>                     WHERE (((Debtors.DebtorID)=19));"

>     rsDebtor.Open strSql, cnDB, adOpenStatic, adLockOptimistic    <-----
> errors here!

> Any ideas????

> Regards

> Dave



Sat, 16 Jul 2005 23:42:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Access exits at PCs with Op.Syst.Win2K Prof./Win2k Server

2. VB & Win2k

3. VB 6.0 & Win2k

4. Using VB to access Win2k Active Directory

5. FileName & Win2K

6. User rights,Win2k&Word97 problem

7. VB6 developed on win2k, but deployed on winME&95 problem

8. VB6 developed on win2k, but deploy on winME&95 problem

9. ASP & Win2K Professional

10. VB5, ActiveX & Win2K

11. VB6 Web Dev & Win2K

12. winsock & win2k

 

 
Powered by phpBB® Forum Software