[AccessD] C# Connecting to the database (or not as the case may be)

jwcolby jwcolby at colbyconsulting.com
Sat Jan 22 15:01:34 CST 2011


I am sitting in the local Arby's doing more connection tests back into my home/office vmDev / 
PrisonMinistries database.

Access 2003 connects *instantly*.  Admittedly small tables snap open, edits save *instantly*.

SSMS connects but not quickly.  I can view the database, see tables and all that.  Opening the 
tables takes 6 seconds.

C# times out after 15 seconds when just trying to "preview" the data directly in the dataset in the 
left hand pane.  Trying to open a form bound to the table times out after approximately 45 seconds.

As I mentioned earlier, when setting up the Access database I found somewhere that I needed to use 
the Hamachi IP address when making the dsn which I did.

SSMS is connecting in to that same Hamachi name.

The C# (2008) project "translated" the ip address to the name "vmDev", and I am not finding where 
the connection information is stored for that dataset.

I created a brand new dataset with the connection set back to the Hamachi IP and voila, the dataset 
can see the data.  Found where the connection is kept (properties of the project) and discovered 
that yep, it had *three* connect strings now, the last of which was directly referencing the IP 
address.  Got rid of all but that one, and now the bound form snaps open as quickly as the Access db 
did.

I think what was going was the the form was trying the first which just plain didn't work, and timed 
out on that before moving on to the next one etc.

Now that I only have one, and it references the IP, all if good in my world.

Much still to learn but at least I can connect a bound (small recordset) list form directly to a 
list table and the form "snaps open" from the Arby's restaurant.

-- 
John W. Colby
www.ColbyConsulting.com



More information about the AccessD mailing list