472,353 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Using DSN-Less connection to Link Tables

Hi,

I have an application that uses MS-SQL Linked tables. I have a utility
routine that drops all links and re-establishes them. It works great
when my connection string is a DSN connection but I would like to
change it to DSN-Less so users don't have to set up ODBC connections on
each workstation.

If I use the following DSN

I'm having the same problem but linking to MS-SQL database. Would like
to use DSN-less connection to link SQL tables to MS Access Application
but always produces the following error:

"Could not find installable ISAM."

Here is the connection string that causes the error:

strConnectionString = "Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

Here is the code that links the tables:

' Loop through list of tables and link to them through ODBC source

'--------------------------------------------------------------------------
For Each varLinkedTableName In colCurrentTables
DoCmd.TransferDatabase acLink, "ODBC Database",
strConnectionString , acTable, varLinkedTableName, varLinkedTableName
Next
Note: the loop above that links these tables works perfectly if I use a
DSN connection string as seen below:

strConnectionString = "ODBC;DSN=MyDatabaseViaDSN;Description=My
Database;" 'Uid=myUserID;Pwd=myPassword"
Anybody know if there is a problem using DSN-Less connections when
executing doCmd.TransferDatabase in access?
Thanks

Nov 13 '05 #1
8 16052
ZRexRider wrote:
Hi,

I have an application that uses MS-SQL Linked tables. I have a utility
routine that drops all links and re-establishes them. It works great
when my connection string is a DSN connection but I would like to
change it to DSN-Less so users don't have to set up ODBC connections on
each workstation.

If I use the following DSN

I'm having the same problem but linking to MS-SQL database. Would like
to use DSN-less connection to link SQL tables to MS Access Application
but always produces the following error:

"Could not find installable ISAM."

Here is the connection string that causes the error:

strConnectionString = "Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

Here is the code that links the tables:

' Loop through list of tables and link to them through ODBC source

'--------------------------------------------------------------------------
For Each varLinkedTableName In colCurrentTables
DoCmd.TransferDatabase acLink, "ODBC Database",
strConnectionString , acTable, varLinkedTableName, varLinkedTableName
Next
Note: the loop above that links these tables works perfectly if I use a
DSN connection string as seen below:

strConnectionString = "ODBC;DSN=MyDatabaseViaDSN;Description=My
Database;" 'Uid=myUserID;Pwd=myPassword"
Anybody know if there is a problem using DSN-Less connections when
executing doCmd.TransferDatabase in access?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your DSN-less connection string lacks "ODBC" at the beginning. It
should be:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

If you want to use NT Authentication instead of SQL logins:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Trusted_Connection=Yes"
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQh9/noechKqOuFEgEQJhLgCeNcFMxaXnX04YutHzWoNoOC/us4kAoKVr
5bKZhOH+/PloofHgB7hEDetI
=o2ps
-----END PGP SIGNATURE-----
Nov 13 '05 #2
MGFoster - You are the MAN! (unless you're a woman)

Thanks - sometimes you just need somebody to look over your shoulder -
I completely blanked out on that.

Have a great weekend.

Nov 13 '05 #3
MGFoster wrote:
Your DSN-less connection string lacks "ODBC" at the beginning. It
should be:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

If you want to use NT Authentication instead of SQL logins:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Trusted_Connection=Yes"


Does anyone know how to do this with Oracle?

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #4
"Tim Marshall" <TI****@PurplePandaChasers.Moertherium> wrote in message
news:cv**********@coranto.ucs.mun.ca...
MGFoster wrote:
Your DSN-less connection string lacks "ODBC" at the beginning. It
should be:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

If you want to use NT Authentication instead of SQL logins:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Trusted_Connection=Yes"


Does anyone know how to do this with Oracle?


Carl Prothman should have the appropriate string at
http://www.able-consulting.com/ado_conn.htm

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #5
DFS
Tim Marshall wrote:
MGFoster wrote:
Your DSN-less connection string lacks "ODBC" at the beginning. It
should be:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUserID;" & _
"Pwd=MyPassword"

If you want to use NT Authentication instead of SQL logins:

strConnectionString = "ODBC;Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Trusted_Connection=Yes"


Does anyone know how to do this with Oracle?

Public Sub createUserLinks()

Set db = CurrentDb()
Dim connectString As String
connectString = "ODBC;DSN=DSNname;UID=userID;PWD=password"
Call createTD("table name in quotes", connectString)

End Sub

Public Sub createTD(tblName As String, connectString As String)

Set td = db.CreateTableDef(tblName)
td.SourceTableName = UCase(tblName)
td.Connect = connectString
db.TableDefs.Append td
db.TableDefs.Refresh
Set td = Nothing

End Sub
Nov 13 '05 #6
DFS wrote:
Does anyone know how to do this with Oracle?
Public Sub createUserLinks()

Set db = CurrentDb()
Dim connectString As String
connectString = "ODBC;DSN=DSNname;UID=userID;PWD=password"
Call createTD("table name in quotes", connectString)


Thanks D, but that's DAO stuff I already do (except I apply it to PTQs
as opposed to linked tables) and it still relies on an existing DSN. 8(

One of the great unfulfilled hopes I have with A2003 when I switched
from A97 was to be able to set up DSNless connections using ADO. SInce
ADO doesn't have the ability to produce persistent pass through
querydefs (which I frequently use for list boxes, combos, form
recordsources, etc) I've given up on it and have stuck with DAO.

BTW, I was reading your notes on A2003 corrupting when the FE gets large
- that happens to me a lot. I find A2003 hideously flakey compared to
A97, but my users have such difficult times with A97 apps when they use
A97 on XP boxes with components from Office 20003 installed as well,
I've given up on A97 and am trying to make do with A2003.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #7
DFS
Tim Marshall wrote:
DFS wrote:
Does anyone know how to do this with Oracle?
Public Sub createUserLinks()

Set db = CurrentDb()
Dim connectString As String
connectString = "ODBC;DSN=DSNname;UID=userID;PWD=password"
Call createTD("table name in quotes", connectString)


Thanks D, but that's DAO stuff I already do (except I apply it to PTQs
as opposed to linked tables) and it still relies on an existing DSN.
8(


Whoops. I see I didn't read the question before tossing out a solution that
didn't fit.

One of the great unfulfilled hopes I have with A2003 when I switched
from A97 was to be able to set up DSNless connections using ADO.
What are their advantages? I'll look into them, though I haven't done much
with the ADO libraries.

SInce ADO doesn't have the ability to produce persistent pass through
querydefs (which I frequently use for list boxes, combos, form
recordsources, etc) I've given up on it and have stuck with DAO.

BTW, I was reading your notes on A2003 corrupting when the FE gets
large - that happens to me a lot.
It makes me furious, because I feel like I have to make a backup every 30
minutes. And MS asks if I want to send an error report - well, I've sent
about 100 of them and still haven't seen any Access patches.

It just happened again yesterday. I decompiled and brought it back from the
dead. Now I'm just waiting for the next time. I will say no user of mine
has ever reported the .mde corrupting, so that's good.

Here's a typical app crash log entry for module corruption (from Event
Viewer): Faulting application msaccess.exe, version 11.0.6355.0, stamp
40aa97a8, faulting module vbe6.dll, version 6.4.99.72, stamp 40b29ba6,
debug? 0, fault address 0x0008baa8.

Is there a later vbe6.dll available?
I find A2003 hideously flakey
compared to A97, but my users have such difficult times with A97 apps
when they use A97 on XP boxes with components from Office 20003
installed as well, I've given up on A97 and am trying to make do with
A2003.


I don't have problems with the tables, ever. Only the modules, and only
when they get large. Or the problem might be lots of forms. I try to make
the forms as light as possible, so rather than attach the code there the
bulk is in modules. But nothing seems to help, least of all Nishant from
Hyderabad India, at su*****@microsoft.com


Nov 13 '05 #8
Br
DFS wrote:
Tim Marshall wrote:
DFS wrote:
Does anyone know how to do this with Oracle?

Public Sub createUserLinks()

Set db = CurrentDb()
Dim connectString As String
connectString = "ODBC;DSN=DSNname;UID=userID;PWD=password"
Call createTD("table name in quotes", connectString)


Thanks D, but that's DAO stuff I already do (except I apply it to
PTQs as opposed to linked tables) and it still relies on an existing
DSN. 8(


Whoops. I see I didn't read the question before tossing out a
solution that didn't fit.

One of the great unfulfilled hopes I have with A2003 when I switched
from A97 was to be able to set up DSNless connections using ADO.


What are their advantages? I'll look into them, though I haven't
done much with the ADO libraries.

SInce ADO doesn't have the ability to produce persistent pass through
querydefs (which I frequently use for list boxes, combos, form
recordsources, etc) I've given up on it and have stuck with DAO.



BTW, I was reading your notes on A2003 corrupting when the FE gets
large - that happens to me a lot.


It makes me furious, because I feel like I have to make a backup
every 30 minutes. And MS asks if I want to send an error report -
well, I've sent about 100 of them and still haven't seen any Access
patches.

It just happened again yesterday. I decompiled and brought it back
from the dead. Now I'm just waiting for the next time. I will say
no user of mine has ever reported the .mde corrupting, so that's good.

Here's a typical app crash log entry for module corruption (from Event
Viewer): Faulting application msaccess.exe, version 11.0.6355.0, stamp
40aa97a8, faulting module vbe6.dll, version 6.4.99.72, stamp 40b29ba6,
debug? 0, fault address 0x0008baa8.

Is there a later vbe6.dll available?


I was getting that with my ADP that is backed onto an SQL server. It
appeared to be some form of corruption in the modules. It also seemed to
only hapen when I edited my A2000 ADP in A2003...

Br@dley
Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kakaz | last post by:
Hi All there! I am quite new in MS SQL administration so let me explain how it work on Your instances of SQL Servers. We have several DTS...
0
by: harish | last post by:
I am using MS SQL server 7.0 as the database for my java and c++ applications. I will be working on a remote PC with my c++ applications and thru...
3
by: McCool | last post by:
How can I get the deployment project to setup a DSN pointing to an Access DB after installation takes place? Also, is there a way to kick off a...
3
by: emily | last post by:
Perhaps this has already been answered. If so, I apologize. I'm a newbie at this stuff. I have a DTS package to import some Visual Foxpro data. ...
6
by: Andi Reisenhofer | last post by:
Hallo C# folks, Somebody know how to create a ODBC DSN dynamically in c# program. Also interesting for me would be the connectionstring for an...
3
by: abcd | last post by:
I want to get the list of data sources on the server machine using C# and ASP.NET any clues how to get that...I have done this using VB using ...
3
by: Niks | last post by:
Hi, I need to connect to SQL server Database using a System DSN. Can anyone tell me how to connect to SQL Server using DSN in ASP.NET (VB.Net)....
0
by: Neo | last post by:
Hello All, ODBCAD32.exe launches DSN Setup. But then I have to select DSN and click configure to configure DSN. Is there any way, I could invoke...
0
by: senthildb2 | last post by:
Hi there, I want to create DSN for DB2 database through my VB application. I have installed DB2 v8.2 with FixPack6.0 ESE. (The actual version...
4
by: bytesbytes | last post by:
Hi, Im using VB6.0, Crystal report 10 and MSaccess Database. I was using Crystal report 6 and later upgraded to CR10. In VB6 i used DSN like ...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.