Solved

The Microsoft Jet database engine cannot find the input table or query 'MSysConf'.

Posted on 2007-11-26
4
2,834 Views
Last Modified: 2008-02-01
Hi guys,
can you help me with this.
I'm trying to use a paramter SQL pass thru query from an access db using QueryDef.
To prove the pooint I'm using the Northwind DB supplied.

Private Sub Text0_AfterUpdate()
On Error GoTo ErrStuff
Dim db As Database
Set db = CurrentDb()
Dim rs As Recordset
Dim qdef As QueryDef
Set qdef = db.CreateQueryDef("")
qdef.Connect = "ODBC;DRIVER=SQL Server;SERVER=CROWTHORNXXX;UID=SA;PWD=XXX;DATABASE=Northwind;"
qdef.SQL = "CustOrderHist '" & Me.Text0 & "'"

Set rs = qdef.OpenRecordset()

exitHere:
Exit Sub
ErrStuff:
Debug.Print Errors(0).Description
MsgBox Err.Number & " " & Err.Description
Resume exitHere

End Sub


if I run this code I keep getting
The Microsoft Jet database engine cannot find the input table or query 'MSysConf'.  Make sure it exists and that its name is spelled correctly.

Now I understand that this is a table that would exist in the SQL database. I haven't created it nor do i wish to. I just want to be able to use a simple pass thru query with a parameter using access front end and sql back end.

Surely this is a simple task. but I can't get it to work. I feel it's something to do with the connect string. I've copied the connection string from a DSN taht I created.

Can anyone help?

Regards

Malcolm
0
Comment
Question by:TrilobyteMKR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 20349362
0
 

Author Comment

by:TrilobyteMKR
ID: 20349406
Arthur,
are you saying I must create this MSysConf table in order to be able to use pass thry queries in access?
Malcolm
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 125 total points
ID: 20350960
That appears to be the case, from the URL from Micorsoft.
0
 

Author Comment

by:TrilobyteMKR
ID: 20351386
I don't think that it does as I almost have it working without the MSysConf file.
In my code I seem top have missed the bit about the local access query

My code has ended up as this

On Error GoTo ErrStuff
Dim db As Database

Set db = CurrentDb()
Dim Rs As Recordset
Dim qdef As QueryDef
Set qdef = db.QueryDefs("qry_custorderhist")
qdef.Connect = "ODBC;DRIVER=SQL Server;SERVER=(local);UID=SA;PW=xxx;DATABASE=Northwind;Trusted_Connection=Yes"
qdef.sql = "exec custorderhist '" & Me.Text0 & "'"
'DoCmd.OpenQuery "Qry_custorderhist"
qdef.Close
Set qdef = Nothing
Set db = Nothing
DoCmd.OpenForm "frm2", acFormDS
frm2.Forms.RecordSource = "qry_custorderhist"
exitHere:
Exit Sub
ErrStuff:
Debug.Print Errors(0).Description
MsgBox Err.Number & " " & Err.Description
qdef.Close
Set qdef = Nothing
Rs.Close
Set Rs = Nothing
Resume exitHere
'

End Sub
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question