Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

51002: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index

483 views
Skip to first unread message

Rick

unread,
Jan 26, 2009, 12:52:09 PM1/26/09
to
I was working on a large, legacy VB6 program when some code that hasn't been
touched for years began failing consistently on one and only one (client)
computer. All mods in the last few years have been done using ADO and we
lack any real expertise in rdo. No such problem on any other developers'
machines.

I think some dll file or something has become corrupted. but I have loaded
all oustanding SQL Server 2008 hot fixes and have uninstalled and
re-installed VB6 - but no change. I find it hard to believe that rdo
communicates with the server when setting up a stored procedure parameter,
but the error message indicates that it's a ODBC/sql server driver issue.
Maybe it validates parameter info as it is set?

- error message: "51002: [Microsoft][ODBC SQL Server Driver]Invalid
Descriptor Index"
- program lang: VB6 (SP6)
- client OS: XP
- technology: rdo
- database: SQL Server 2005 on server; using SQL Server 2008 client tools
- code:

Set m_q = New rdoQuery
Set m_q.ActiveConnection = DB.Connection
m_q.QueryTimeout = 0
m_q.SQL = "execute member_find ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?"
m_qFindResults.SetParam 0, rdParamInput, True

[ more statements defining other parameters ]

Sub SetParam(ID As Variant, Class As RDO.DirectionConstants, Optional Value
As Variant)
m_q(ID).Direction = Class <--------- error raised on this line
If Not IsMissing(Value) Then
m_q(ID) = Value
End If
End Sub

Note: parameter constant rdParamInput resolves to 0

[also plan to post in VB6 group]

sugu

unread,
Feb 4, 2009, 6:52:48 AM2/4/09
to

dear sir i have one problem i using vb06 result go to excel odbc query
file. How am i open thil file from vb06

0 new messages