Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Override the GetConnectionString Method - SqlCE
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01245516
Message ID:
01245582
Views:
26
Never mind, I figured it out.

After posting this question, I saw another thread about ovrriding the GetConnectionString method in Abusiness Object. This is what I did and it works fine.


>The connection string for SqlCE can contain a path like this:
>
>Data Source = C:\MyApp\MyApp.sdf
>
>This works great if the database will always be in the same folder, but I would like my install to copy the database to the Common Application Folder for all Users. So in Windows XP, the folder might be:
>
>C:\Documents and Settings\All Users\Application Data\MyApp
>
>The Common Application Folder in Windows Vista is totally different. So I would like to default my connection string to just the database name. Then add logic to the mmBuisnessObject.GetConnectionString() method to add the correct path.
>
>What is the best way to accomplish this? Can I add a Factory method? Thanks in advance for any help.
>
>Kind Regards,
>
>Mat
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform