Jumat, 03 Agustus 2012

RE: [MS_AccessPros] Re: vba to make Pass through Queries (with no DSN)

If you have a linked table to the same database, you can borrow that table's connect property (that's what I usually do).qPT.connect=currentdb.tabledefs("some odbc linked table").connect Steve
To: MS_Access_Professionals@yahoogroups.com
From: wrmosca@comcast.net
Date: Fri, 3 Aug 2012 15:21:45 +0000
Subject: [MS_AccessPros] Re: vba to make Pass through Queries (with no DSN)


























Hendra



The easiest way I know is to create a DSN file and use the builder button in the properties box to select it as the connection string. It doesn't actually use the DSN file. It just copies the parameters.



A typical connection string to a SQL Server database using windows Authentication would look like this:



ODBC;DRIVER=SQL Server;SERVER=InstanceNameGoesHere;DATABASE=DBNameGoesHere;Trusted_Connection=Yes



Regards,

Bill Mosca, Founder - MS_Access_Professionals

http://www.thatlldoit.com

Microsoft Office Access MVP

https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E

My nothing-to-do-with-Access blog

http://wrmosca.wordpress.com



--- In MS_Access_Professionals@yahoogroups.com, "agesthahendra@..." <agesthahendra@...> wrote:

>

> Hi Everyone,...

>

> I'm trying to write VBA to make a PTQ but with no DSN in the syntax but

> using Connection string since connection string don't require a DSN.

> Any example to do this would be appreciated...thank you.

>

> Regards

> Hendra

>


















[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar