Object Cannot Access Database After Compiled When Called From ASP 
Author Message
 Object Cannot Access Database After Compiled When Called From ASP

Sample Program to demonstrate. Running the following dll in the debug runs
fine. Compile the dll and running the ASP produces:

Error Type:
Microsoft JET Database Engine (0x80004005)
ODBC--connection to '{SQL Server}Sponge-Bob' failed.
/adoxtest.asp, line 3

I am guessing it is some kind of security problem, but I am not able to
determine
the source. Anyone have ideas?

'------------------------------ADOXTester.dll--------------
Option Explicit

Public Sub CreateDB()
Dim oCatalog As New ADOX.Catalog
Dim oTable As New ADOX.Table

oCatalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\temp\adoxtest.mdb"

Set oTable.ParentCatalog = oCatalog
oTable.Name = "Test"
oTable.Properties("Jet OLEDB:Link Provider String") = "ODBC;Driver={SQL
Server};" & _
                                                        "Server=Sponge-Bob;"
& _
                                                        "Database=Dev;" & _
                                                        "Uid=sa;" & _
                                                        "Pwd=;"

oTable.Properties("Jet OLEDB:Remote Table Name") = "Test"
oTable.Properties("Jet OLEDB:Cache Link Name/Password") = True
oTable.Properties("Jet OLEDB:Create Link") = True

oCatalog.Tables.Append oTable

Set oTable = Nothing
Set oCatalog = Nothing

End Sub

'-------------------------------------ADOXTest.asp--------------------------
-
<%
set cTest = server.createobject("ADOXTester.clsTest")
cTest.createDB
response.write "Finit"
%>



Fri, 10 Sep 2004 23:41:11 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Calling VBA functions in an Access database from an ASP page

2. VB6: cannot compile project with ADO data objects

3. VB6: cannot compile project with ADO objects on second machine

4. com object will not read registry when com object called from asp (vb works fine)

5. Access 2000 cannot compile

6. cannot create a file system object in ASP

7. CANNOT Date Format using vbscript on asp page into MYSQL dataBase

8. Need to Access ASP Session Objects from External COM Object

9. Cannot save objects in external database

10. New to VB: Workspace and Database object throwing error during compile

11. Cannot create database object any more

12. Cannot update Database or Object is read-only.

 

 
Powered by phpBB® Forum Software