A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ADOX: "Could not find installable ISAM" error



 
 
Thread Tools Display Modes
  #1  
Old June 9th, 2009, 03:01 AM posted to microsoft.public.access.tablesdbdesign
Krish[_3_]
external usenet poster
 
Posts: 2
Default ADOX: "Could not find installable ISAM" error

Folks,

I have used the following code to link SQL Server tables in MSAccess using
ADO connection string. On my newly built XP machine I am getting this
dreadful error (-2147467259 (80004005) Could not find installable ISAM).
OS: Windows XP Svc PK 3
ADO version 2.8

Any help will be highly appreciated.

Krish.

LinkATable "Provider=SQLOLEDB.1;Password=%PWD%;User ID=%UID%;Initial
Catalog=%DBNAME%;Data Source=%SERVER%",
"sa","password","mytable","mytable","mydb"

Public Function LinkATable( _
sUID$, _
sPWD$, _
sSourceTable$, _
sLinkAs$, _
sDBName$, _
sConnstrTemplate$, _
Optional sDSN$ = "", _
Optional sDataSource$ = "", _
Optional sServer$ = "")

Dim oCat As Object
Dim oTable As Object
Dim sConnString$

sConnString = sConnstrTemplate
sConnString = Replace(sConnString, "%DSN%", sDSN)
sConnString = Replace(sConnString, "%UID%", sUID)
sConnString = Replace(sConnString, "%PWD%", sPWD)
sConnString = Replace(sConnString, "%DBNAME%", sDBName)
sConnString = Replace(sConnString, "%SERVER%", sServer)

' Create and open an ADOX connection to Access database
Set oCat = CreateObject("ADOX.Catalog")
Set oCat.ActiveConnection = CurrentProject.Connection

' Create a new Table object
Set oTable = CreateObject("ADOX.Table")
With oTable
.Name = sLinkAs
Set .ParentCatalog = oCat
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Remote Table Name") = sSourceTable
.Properties("Jet OLEDB:Link Provider String") = sConnString
.Properties("Jet OLEDB:Cache Link Name/Password") = True
.Properties("Jet OLEDB:Link Datasource") = sDataSource
End With

' Add Table object to database
oCat.Tables.Append oTable ' GIVES THE ERROR
oCat.Tables.Refresh
Set oCat = Nothing

End Function


  #2  
Old June 9th, 2009, 10:03 PM posted to microsoft.public.access.tablesdbdesign
Graham Mandeno
external usenet poster
 
Posts: 593
Default "Could not find installable ISAM" error

Hi Krish

I don't know if was a typo or not, but in your sample call:

LinkATable "Provider=SQLOLEDB.1;Password=%PWD%;User ID=%UID%;Initial
Catalog=%DBNAME%;Data Source=%SERVER%",
"sa","password","mytable","mytable","mydb"


you appear to be passing sConnstrTemplate as the first argument, whereas in
your function declaration:

Public Function LinkATable( _
sUID$, _
sPWD$, _
sSourceTable$, _
sLinkAs$, _
sDBName$, _
sConnstrTemplate$, _
Optional sDSN$ = "", _
Optional sDataSource$ = "", _
Optional sServer$ = "")


it is declared as the sixth argument.

Also, I believe you should have "ODBC;" at the start of your connection
string.


--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand


"Krish" wrote in message
...
Folks,

I have used the following code to link SQL Server tables in MSAccess using
ADO connection string. On my newly built XP machine I am getting this
dreadful error (-2147467259 (80004005) Could not find installable ISAM).
OS: Windows XP Svc PK 3
ADO version 2.8

Any help will be highly appreciated.

Krish.

LinkATable "Provider=SQLOLEDB.1;Password=%PWD%;User ID=%UID%;Initial
Catalog=%DBNAME%;Data Source=%SERVER%",
"sa","password","mytable","mytable","mydb"

Public Function LinkATable( _
sUID$, _
sPWD$, _
sSourceTable$, _
sLinkAs$, _
sDBName$, _
sConnstrTemplate$, _
Optional sDSN$ = "", _
Optional sDataSource$ = "", _
Optional sServer$ = "")

Dim oCat As Object
Dim oTable As Object
Dim sConnString$

sConnString = sConnstrTemplate
sConnString = Replace(sConnString, "%DSN%", sDSN)
sConnString = Replace(sConnString, "%UID%", sUID)
sConnString = Replace(sConnString, "%PWD%", sPWD)
sConnString = Replace(sConnString, "%DBNAME%", sDBName)
sConnString = Replace(sConnString, "%SERVER%", sServer)

' Create and open an ADOX connection to Access database
Set oCat = CreateObject("ADOX.Catalog")
Set oCat.ActiveConnection = CurrentProject.Connection

' Create a new Table object
Set oTable = CreateObject("ADOX.Table")
With oTable
.Name = sLinkAs
Set .ParentCatalog = oCat
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Remote Table Name") = sSourceTable
.Properties("Jet OLEDB:Link Provider String") = sConnString
.Properties("Jet OLEDB:Cache Link Name/Password") = True
.Properties("Jet OLEDB:Link Datasource") = sDataSource
End With

' Add Table object to database
oCat.Tables.Append oTable ' GIVES THE ERROR
oCat.Tables.Refresh
Set oCat = Nothing

End Function




  #3  
Old June 10th, 2009, 12:12 AM posted to microsoft.public.access.tablesdbdesign
Krish[_3_]
external usenet poster
 
Posts: 2
Default [SOLVED] "Could not find installable ISAM" error

Hello Graham,

I called Microsoft today. They told me OLE Provider syntax is not supported
in the connection string.
The following connection string format works to link external table using
the code in my original message:
"ODBC;Driver={SQL
Server};Server=%SERVER%;UID=%UID%;pwd=%PWD%;Databa se=%DBNAME%"

Regards.

Krish


"Graham Mandeno" wrote in message
...
Hi Krish

I don't know if was a typo or not, but in your sample call:

LinkATable "Provider=SQLOLEDB.1;Password=%PWD%;User ID=%UID%;Initial
Catalog=%DBNAME%;Data Source=%SERVER%",
"sa","password","mytable","mytable","mydb"


you appear to be passing sConnstrTemplate as the first argument, whereas
in your function declaration:

Public Function LinkATable( _
sUID$, _
sPWD$, _
sSourceTable$, _
sLinkAs$, _
sDBName$, _
sConnstrTemplate$, _
Optional sDSN$ = "", _
Optional sDataSource$ = "", _
Optional sServer$ = "")


it is declared as the sixth argument.

Also, I believe you should have "ODBC;" at the start of your connection
string.


--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand


"Krish" wrote in message
...
Folks,

I have used the following code to link SQL Server tables in MSAccess
using ADO connection string. On my newly built XP machine I am getting
this dreadful error (-2147467259 (80004005) Could not find installable
ISAM).
OS: Windows XP Svc PK 3
ADO version 2.8

Any help will be highly appreciated.

Krish.

LinkATable "Provider=SQLOLEDB.1;Password=%PWD%;User ID=%UID%;Initial
Catalog=%DBNAME%;Data Source=%SERVER%",
"sa","password","mytable","mytable","mydb"

Public Function LinkATable( _
sUID$, _
sPWD$, _
sSourceTable$, _
sLinkAs$, _
sDBName$, _
sConnstrTemplate$, _
Optional sDSN$ = "", _
Optional sDataSource$ = "", _
Optional sServer$ = "")

Dim oCat As Object
Dim oTable As Object
Dim sConnString$

sConnString = sConnstrTemplate
sConnString = Replace(sConnString, "%DSN%", sDSN)
sConnString = Replace(sConnString, "%UID%", sUID)
sConnString = Replace(sConnString, "%PWD%", sPWD)
sConnString = Replace(sConnString, "%DBNAME%", sDBName)
sConnString = Replace(sConnString, "%SERVER%", sServer)

' Create and open an ADOX connection to Access database
Set oCat = CreateObject("ADOX.Catalog")
Set oCat.ActiveConnection = CurrentProject.Connection

' Create a new Table object
Set oTable = CreateObject("ADOX.Table")
With oTable
.Name = sLinkAs
Set .ParentCatalog = oCat
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Remote Table Name") = sSourceTable
.Properties("Jet OLEDB:Link Provider String") = sConnString
.Properties("Jet OLEDB:Cache Link Name/Password") = True
.Properties("Jet OLEDB:Link Datasource") = sDataSource
End With

' Add Table object to database
oCat.Tables.Append oTable ' GIVES THE ERROR
oCat.Tables.Refresh
Set oCat = Nothing

End Function






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.