Universal connection string

Hi

My system reads Excel data using a database approach.

I use the following connection string as this returns extended characters:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source='';Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";

But if that fails then I use the simpler string:

Provider=MSDASQL.1;DSN=Excel Files;DBQ=;CharSet=utf-8;Auto Translate=False;HDR=Yes';

But sometimes that fails too.

Is there a universal string that will work or do I need to make sure certain Microsoft DB engine services are installed and if not then install them?

Will the above connections strings work on non-English Windows?

Thanks for any help.

CD

0
edit delete
are you sure?
asked Chris Devrell

1 answer

The connection string created by VB works for my PC in light of the way and even tho inside the program I utilized ways which just incorporate the name of the document i have to stack when i do that with the DB it doesn't works.

This is the message i get:

An endeavor to append an auto-named database for record Database1.mdf fizzled. A database with a similar name exists, or indicated record can't be opened, or it is situated on UNC essay dune share.

So on the off chance that anybody realizes what string way i can utilize with the goal that it will open in another PC i'd welcome it.

0
edit delete
are you sure?
answered Nathanial Goyette

Post an answer but please log in first

Post Answer
  1. Please log in to post answer

Similar Questions

Tagsfor this question

Forumall questions