I need to access an SQL Server that is on a machine behind a firewall and you access this machine using an ip address like 95.95.95.33:6930 (not the real ip address) ... But, you get my point that by accessing 95.95.95.33 on port 6930, the firewall routes the requests to that particular machine ...
My question is ... How do you construc...
In the event my project is deployed with an incorrect, incomplete or missing connection string i'd like an application startup check for db connectivity, and if there is none, direct all requests to a DatabaseConnectionError page of some sort, what are my options? I don't think there's a specific http error code that would fit this error...
We have a custom function AppSettings.GetConnectionString() which is always called to determine the connection string that should be used. How this function works is unimportant to the discussion. It suffices to say that it returns a connection string and I have to use it.
I want my LINQ to SQL DataContext to use this so I removed all...
I'm writing an application in C# for a smart device running Windows Mobile 6.1. It's pretty basic. Just querying a database and getting results. Nothing too fancy.
This program is only going to be deployed internally, but we still want to be secure with our SQL connection info.
What's the best way I should go about encrypting/securing ...
I have been banging my head with this one more the two weeks, and still don't know what the problem is ( I can't narrow it down). The problem is the following. I have a solution with 3 project in it all written in c# and I with LINQ. One project is the main web site, the other is the data layer (communication with the database) and the t...
I want to encrypt the connection string in web.config, the problem is each time a developer changes the connection string in web.config and publishes, it needs to be encrypted every time in the web server. Is there any way that the connection string can encrypted automatically every time someone publishes it?
Note :- All of us work on o...
I want to use the connection string App.Config file. Also is it possible to use NHibernate connect to 2 databases (different connection strings) if so how?
...
Actually in my system having 2007 office then i am reading the 2003 .xls file with using the 2007 connection string
string ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Filename + ";Extended Properties=\"Excel 8.0;HDR=YES;\"";
data is not reading. But if the first row first column data length is lessthen 255 the...
Hi, so I'm very very far from an expert on MVC or ASP.NET. I just want to make a few simple Controllers in C# at the moment, so I have the following question;
Right now I have the connection string used by the controller, -inside- the controller itself. Which is kind of silly when there are multiple controllers using the same string. I...
I'm looking for a macro/vbs to update all the external data query connections to point at a different server or database. This is a pain to do manually and in versions of Excel before 2007 it sometimes seems impossible to do manually.
Anyone have a sample? I see there are different types of connections 'OLEDB' and 'ODBC', so I guess I n...
I have a VB.NET application with a connection to an SQL Server 2003. On the server there are two databases, MyDatabase and MyDatabase_Test. What I would like to do is to show a dialog when the program starts that let's the user choose which database to use. My idea is to create a new form as the starup form that sets this property and th...
I have an ASP.NET project which gives me the following exception if I try to run it
Where should I "call" it before I can use it ?
There is no global.asax in my solution
...
At the moment I'm searching for properties for a connection string, which can be used to connect to an Excel file in readonly mode. Searching Google gets me a lot of examples of connection strings, but I can't seem to find a specification of all possibilities in the 'Extended Properties' section of the OleDb connection string.
At the mo...
Hi,
I'm getting very confused about how to call my EF classes in a Class Library from the Client Project I have? Things worked fine when they were in the same project. Now I'm getting errors such as "Unable to load the specified metadata resource ".
I've see various ideas / suggestions re how to fix the connection string (e.g. creat...
Hi,
I have a need to support extensive auditing capabilities for a system backing into Sql Server 2008. Since I plan to use LINQ (with no Stored Procs), the database would be a clean, zero contact data repository.
However, I need to pratically record a snapshot of every change that happens in the db. So, I thought I should use triggers....
Thanks for taking a look at my post.
I've been working with linq to sql and have generally been happy, until i just noticed that database table names are hardcoded into the classes/dbml files-- which can't work in our environment. We need to be able to have database names completely changeable via web.config-- in one place. That's a def...
I am currently using datasets for my data access layer. I currently store the connection string in the web.config file. I need the ability to change the connection to another database before any queries are processed. Is there an event that is triggered or a base class that can be modified that intercepts the process of retrieving the...
Hi there, we've had a ASP.NET web application deployed for a number of years now.... last week we migrated to a slightly slower server to save some money.
Now we're frequently getting command timeouts:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
This is understandable...
Hi ,
I have a problem connecting to my db on a shared hosting. My host provider says they deployed SQL 2005 express on their database and I prepared my connection string as follows to take advantage of sql express.
<add name="PMIS_DBConnectionString" connectionString="Server=localhost;AttachDBFilename=|DataDirectory|PMIS_DB.mdf;Databas...
I am using the below SP to return the value of Generated Insert statement and it works fine when executed in Query browser.
When i try to get the value from C#, it give's me "System.Byte[]" as return value.
When i try to get the value from MySql query browser, it give's me return value as :
'insert into admindb.accounts values("54321...