Problem opening a query in ACCESS through workgroup connection string

Problem opening a query in ACCESS through workgroup connection string

Post by Sher » Thu, 21 Nov 2002 03:35:34



i have a following connection string which is perfectly fine and i can
successfully access to the ACCESS database through workgroup
connection string.

"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Shared\NetAccessDatabase\Net.mdb;user
id=SYSTM;Password=tmsa;Jet OLEDB:System
database=c:\Winnt\system32\system.mdw;"

once i have accessed to the ACCESS databae i have tried to open a
query called vtblDefaultSegment...The code for query
vtblDefaultSegment is as follows:

 SELECT [IDSegment]
FROM tblTMSGroups
WHERE GroupID=SYSTM;

 when i do this i should get one record back but instead i get an
error messaga saying "No value given for one or more required
parameters"...I would really appreciate if some one could really help
me with this...Seems like i couldn't open the query
vtblDefaultSegment..Thanks

 
 
 

1. Problem opening a query in ACCESS through workgroup

i have a following connection string which is perfectly fine and i can
successfully access to the ACCESS database through workgroup
connection string.

"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Shared\NetAccessDatabase\Net.mdb;user
id=SYSTM;Password=tmsa;Jet OLEDB:System
database=c:\Winnt\system32\system.mdw;"

once i have accessed to the ACCESS database i have following function
to open the recordset with  sSQL = "select IDSegment from
vtblDefaultSegment"

The code for query vtblDefaultSegment is as follows:

 SELECT [IDSegment]
FROM tblTMSGroups
WHERE GroupID=SYSTM;

and try to fill the DataSet..

Shared Function OpeniTMSDataset(ByRef rsRecordSet As DataSet, ByVal
sSQL As String, ByVal sConnectionString As String, Optional ByVal
iOpenOption As Integer = DBConst.tmsDBEdit) As Boolean

       Dim objDA As OleDb.OleDbDataAdapter
        On Error GoTo ERRORHANDLER

        objDA = New OleDb.OleDbDataAdapter(sSQL, sConnectionString)
        objDA.Fill(rsRecordSet)
        objDA = Nothing
        OpeniTMSDataset = True
        Exit Function

ERRORHANDLER:
        u_errMessage = Err.Description
    End Function

 when i do this i should get one record back but instead i get an
error message saying "No value given for one or more required
parameters"...I would really appreciate if some one could tell me what
i am doing wrong here...Seems like i can't open the query
vtblDefaultSegment in access through workgroup
connectionstring.....Thanks

2. File name length

3. Problem with Connection String and Workgroup Information File

4. ADODB connection error

5. Specifiying a Workgroup File When Using ADO to Open an Access .mdb file (OLEDB)

6. Xbase Vs. Client-Server

7. SQL Server connections not closing when Access connection also open

8. How to open secured database through ODBC without sending UID and PWD in connection string

9. Alter datasource/connection string when opening a VB form

10. Open/Close Connection String