LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default ADO connection problem when using server

I am using the following code to connect to an Access Database. Everything
works great when both the Excel workbook and Access database are on my local
C: drive. When I try to put both on the network drive (Windows 2000 server)
and run the spreadsheet from there Excel will freeze ( I do not get any error
message and must restart my computer) If I check the Access table, the
updated data is there so I am assuming that the connection is OK but for some
reason maybe it cannot close the connection? Does anyone have any Idea what
could cause this, and how I might troubleshoot this?

code:

Public Sub TransferDB()
Dim cnn As ADODB.Connection
Dim sPath As String
Dim sConnect As String
Dim sSQL As String

Const dbfullname As String = "J:\Cost & manufacturing times\Data.mdb"
sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & "data source=" _
& dbfullname & ";"

sSQL = "INSERT INTO tblBallscrewData (Customer,Customer_PN, etc........

VALUES ( '" _
& TxtCustomer & "', '" etc........


Set cnn = New ADODB.Connection
cnn.ConnectionString = sConnect
cnn.Open
cnn.Execute sSQL, , adCmdText + adExecuteNoRecords
cnn.Close
Set cnn = Nothing

End Sub

Thanks for taking the time to read this Post!

--
B Kraska
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem updating link from Novell server to windows server #REF er Ellen Excel Discussion (Misc queries) 0 May 10th 05 09:18 PM
ado connection to access vs. sql server? Loane Sharp Excel Programming 7 November 16th 04 05:08 PM
Check for valid SQL server connection Robert W. King Excel Programming 1 September 8th 04 09:29 AM
ODBC connection for insert into SQL Server nevada Excel Programming 1 February 23rd 04 04:14 PM
sql server connection Andy Wiggins[_3_] Excel Programming 0 January 27th 04 08:40 AM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"