Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

workgroup connection string to open a query in access database

Status
Not open for further replies.

namche

Programmer
Nov 20, 2002
2
US
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 tried to open a
query called vtblDefaultSegment...The code for query
vtblDefaultSegment is as follows: and called the function OpeniTMSDataset to open the query

vtblDefaultSegment = SELECT [IDSegment]
FROM tblTMSGroups
WHERE GroupID=SYSTM;

sSQL = "select * from vtblDefaultSegment"

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 using workgroup connection string....Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top