The application my team is currently developing has a DLL that is used to perform all database access. The application can not use a trusted connection because the database is behind a firewall and the domain server is not. So it appears that the connection string needs to have a DB username and password. The DLL currently has the dat...
Does anyone know if it is possible to display a prompt to a user/administrator when activating or installing a sharepoint feature?
I am writing a custom webpart and it is connecting to a separate database, I would like to allow the administrator to select or type in a connection string when installing the .wsp file or activating the f...
What would be a very fast way to determine if your connectionstring lets you connect to a database? Normally a connection attempt keeps the user waiting a long time before notifying the attempt was futile anyway...
...
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%?
...
Hi All,
I'm looking for a way to configure a DB connection at runtime; specifically using the Enterprise Library. I see that there's a *.Data.Configuration (or something close to this ... don't recall off the top of my head) assembly but am finding not much on the interwebs. Complicating matters is the fact that the API help is broken...
I would like to offer a database connection prompt to the user. I can build my own, but it would be nice if I can use something that somebody else has already built (maybe something built into Windows or a free library available on the Internet). Anybody know how to do this in .Net?
EDIT: I found this and thought it was interesting: Sho...
I have an application that uploads an Excel .xls file to the file system, opens the file with an oledbconnection object using the .open() method on the object instance and then stores the data in a database. The upload and writing of the file to the file system works fine but I get an error when trying to open the file on our production...
I've encrypted the connectionstring in my web.config file using the steps in the link below:
http://www.codeproject.com/KB/database/WebFarmConnStringsNet20.aspx
However, whenever I call my application, it will give the following error:
Failed to decrypt using provider
'CustomProvider'. Error message from
the provider: The RSA ...
I have a large ADO.Net dataset and two database schemas (Oracle) with different constraints. The dataset will work with either schema, but I want to be able to tell the dataset which schema to use (via connection string) at runtime.
Is that even possible?
...
Just found this out, so i am answering my own question :)
Use a comma where you would normally use a colon. This can be a problem for named instances, as you seem to need to specify the port even if it is the default port 1433.
Example:
Provider=SQLOLEDB;Data Source=192.168.200.123,1433; Initial Catalog=Northwind; User Id=WebUser; Pas...
I've used all three of these when making local programmatic connections to databases. Is there any real difference between them?
...
I am trying this:
Provider=MSDASQL.1;Persist Security Info=False;User ID=sys;Password=pwd;Initial Catalog=DATABASE;Data Source=OdbcDataSource;DBA Privilege=SYSDBA
But I get the error:
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
I'm using Delphi, but answers in any language are welcome.
Clarification:
I am ab...
I have a connection string being passed to a function, and I need to create a DbConnection based object (i.e. SQLConnection, OracleConnection, OLEDbConnection etc) based on this string.
Is there any inbuilt functionality to do this, or any 3rd party libraries to assist. We are not necessarily building this connection string, so we cann...
Eg.
ConnectionDetails cd = new ConnectionDetails ();
cd.ProviderName = "System.Data.OleDb";
cd.DataSource = "serverAddress";
cd.Catalog = "database";
cd.UserId = "userId";
cd.Password = "password";
string connectionString = cs.CreateConnectionString();
// Should return:
// "Provider=SQLOLEDB;Data Source=serverAddress;Initial Catalog=da...
Okay I'm still learning the ropes with the Entity Framework and I came across one more small issue.
When I create my Entity Model from the SQL Server 2008 database it warns me about saving the login information in the connection string in the config file. Initially I wasn't concerned about that so I just left it in there, but now I want...
Is it possible to change the connection string of a published sql reporting services report? I can see the binary field called DataSource in the ReportServer database, but since it's stored as binary I don't think it's easily updatable.
Do I need to republish the report with the correct data source? I'm hoping not since I do not want to...
I am trying to connect to a SQL Server Compact edition db (.sdf) from Access 2003. Here's the start of my code:
Const sdfPath = "C:\SSCE\AmphiData.sdf"
Dim pConn as ADODB.Connection
Set pConn = new ADODB.Connection
pConn.ConnectionString = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source = " & sdfPath
pConn.Open
The Open com...
We are building an enterprise application in which we will incorporate multiple platforms for user interfaces (i.e. ASP.net webapp, Windows Application, and someday, Mobile Apps) and multiple platforms for back-end databases (i.e. SQL Server, XML, Oracle). An additional neccesity is that these back-end DBs either be centralized and acce...
I have a web application that comprises the following:
A web project (with a web.config file containing a connection string - but no data access code in the web project)
A data access project that uses LINQ-SQL classes to provide entities to the web project UI (this project has a settings file and an app.config - both of which have con...
In my ASP.NET application I have a web.config file. In the web.config file I have a connection string...
<connectionStrings>
<add name="HRDb" connectionString="xxxxx" providerName="System.Data.SqlClient" />
</connectionStrings>
Yet, when I retrieve this value using ConfigurationManager.ConnectionStringsp["HRDb"], I get the my old ...