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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ad Hoc Distributed Queries

Status
Not open for further replies.

CP60

Programmer
Oct 16, 2008
145
DE
I have an sql instance on a server which a vb 6 program accesses from the client. There are only about a dozen users running the program and the instance is only for this vb 6 program.

I am extracting up to 100,000 records into an MS Access db for reporting and using from the vb 6 program on the client

INSERT INTO OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=" & sFile & ";User ID=Admin;Password=')...TheTable(SomeField1) SELECT SomeField1 FROM dbo.SomeTable"

In order to do so, I needed to set on the server:

sp_configure 'Ad Hoc Distributed Queries',1;

Is this really a bad or dangerous thing to do?

 

Forgot to write that I am using SQL Server 2005.
However, does this work on the 2005 Express version also?
 
Why haven't you linked the SQL tables directly into the Access mdb?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top