database-connection

will multiple connections to any type of database(MS SQL, Oracle,DB2, MS access) from mulitple threads of an application developed in C# increase insert quries performance?

Here I am dealing with a database containing tens of millions of records. I have an application which connects to the database, gets all the data from a single column in a table and does some operation on it and updates it(for mssql - using cursors). For millions of records it is taking very very ... long time to update.So I want to mak...

How to connect to SQL Server through proxy server

Is it possible to connect to SQL Server server through proxy (http) using SQLSERVER oledb provider? How can I specify proxy address and port in connection string if it's possible? What nonstandard methods to bypass proxy you'd recommend if it's not possible? ...

Best way to check OleDbConnection state

Apparently (MSDN) sometimes OleDbConnection.ResetState() does nothing, so even if the connection fails OleDbConnection.State will still be set to Open. I am looking for best workaround for this, so that when I check connection state I can avoid raising exceptions (as long as connection hasn't failed between the last check and usage attem...

Linking multi-database information

What are your methods of linking data spread over multiple databases architectures (think MySQL vs PostgreSQL etc), into a single application? Would you create giant hashtables/arrays to match content against one another? Are there other, more effective and less memory-consuming options for doing this? If you were to use data both fro...

best practices for database applications

I asked myself, what the community considers "best practices" when it comes to building a frontend for a database. e.g.: should every form has its own connection? should all the database related stuff go into a separate layer? That is: creating a class, that handles all things database, which I then instantiate from my forms and so on...

What "exec sp_reset_connection" shown in Sql Profiler means?

Trying to understand what Sql Profiler means by emitting "sp_reset_connection". I have the following, "exec sp_reset_connection" line followed by BatchStarting and Completed, RPC:Completed exec sp_reset_connection SQL:BatchStarting SELECT [c].[TestID] AS [TestID], [c].[Description] AS [Description] FROM [dbo].[Test] AS [c] SQL:...

ODBC 5.1 connection string for MySQL with read-only access

I have read-access to a MySQL database and am trying to connect to it via the MySql ODBC 5.1 driver. I'm getting an authorization failure (401) from the server. The administrator set up my access as follows: mysql> grant select, create temporary tables on theDatabase.* to 'adrian' identified by 'password'; I am successful in connecting...

VC++ database connection

Hi we are developing Vc++ project while executing this strSQL = _T("SELECT * FROM tblTestInfo_SI ") _T(" WHERE (idOnLineStatus = 1)"); while passing this query through below function shows some error. idOnLineStatus this datatype is number bSuccess = m_prsTestInfoSI->Open( CRecordset::dynaset, strSQL, CRecordset::none ); DBMS: ...

How to work on data record (add, edit and delete) in an access DB with VB.NET?

Working on Access 2007 and Visual Studio 2008, i already connected my database to the application and can see the data on datagrids and can add or edit or delete records, the problem is that those changes do not go to the database, so when i close and reopen the application, i found the old data as it was before. Note: i used the wizard ...

How do I change a Crystal Report's ODBC database connection at runtime?

I have a report made with Crystal Reports 2008 that I need to deploy a production system which means that I need to be able to change the database connection at runtime. The database is PostgreSQL 8.3.0 and the connection I use for creating the initial report is an ODBC connection. I have found various ways to change the database conne...

Finding Active Visual Studio 2008 Connection Strings

Is there a simple way to figure out which connection strings are being used in my web.config. After a lot of LinqToSQL testing, I have a few extra connection strings sitting in my web.config that I'm sure aren't being used, but I'm not exactly sure which ones are/aren't. Any quick ways to single these out. The obvious solution is to p...

database connection doesn't work when service starts at boot but works when it's manually started

I'm trying to track down possible causes of my app not being able to connect to a db server. I have a windows service that connects to the database when it starts. The service runs on machines with a reliable wired network connection. It's installed with startup Automatic so normally it starts when windows does, and in almost all cases...

How to get ASPNET to be recognized as a Trusted Connection by SQL Server 2005

Here's the situaiton. I'm working on developing a new website to access an old database. This is a DoD installation so there's lots of security around. The current application is written in classic ASP, VBScript and some javascript. The new systems is ASP.NET. Accessing the database in the old system meant hitting the server with yo...

Quick Swing question: Need to shut down my database on close

I've been building a test application that works with a database that up until recently has been without a UI. I'm adding one now. Problem is, the JFrame is launched in another thread and I need my database connection to close when that thread closes (when the UI closes, I should say). How do I do this? Also, what happens to the appl...

How do I close an OracleConnection in .NET

Say I have these two objects: OracleConnection connection = new OracleConnection(connectionString); OracleCommand command = new OracleCommand(sql, connection); To close the connection or Oracle, do I have to call command.Dispose(), connection.Dispose(), or both? Is this good enough: using(connection) { OracleDataReader reade...

Is a good idea to build in-memory indexes and circumvent the DB when operating intensively on a small subset?

I'm working on a program to automatically find optimal shift assignments, subject to lots of constraints. I'm using grails, i.e. the data about workers, shifts and assignments will be kept in a DBMS. For the optimization itself, I'll have to work very intensively on a small subset of the data (about 600 rows total from about 5 differen...

Sharepoint Database Access within a domain

I have two servers in a domain. Web Server & Database Server. I have a number of standard .net websites accessing the SQL Server with no problems, using SQL Username/password combos for each database. Sharepoint configures the access as Integrated Security=True When I ran the Config wizard, I 'briefly' saw the Admin top-site. After a s...

SqlConnectionStringBuilder form in .net C#

I am wondering how I can add DATA LINK form to my WIN application. You know those forms where Users can choose on witch SQL server they going to connect and what type of security they going to use and on wht database. Something like on this picture ...

Testing models with multiple database connections in Rails using ActiveRecord

What is the best way to test a model that is using a different database connection in Rails. For example I have a model FooBar that is read only: class FooBar < ActiveRecord::Base establish_connection configurations['foo_bars'] # ... end Are there any good conventions, hacks, or plugins out there? ...

How do you manage database connections and transactions across inserts in an Object Oriented way, using VB.net or C#?

I'm to the point now in my programming development that I'm trying to take advantage of Object Oriented Design instead of the basic behind the button procedural stuff I have been doing. In a current project I'm taking repeated, copy and paste sql server insert code and migrating it to classes with properties, methods, etc... One is...