Questions tagged [dbconnection]
230 questions
2
votes
1 answer
Where these Listener.ora and TNSnames.ora files are present in Windows 10
I have downloaded the Oracle SQL developer in Windows 10.
Trying to create the DB connection in oracle SQL developer.But don't know the username and password.
Google suggested to check username and password in "Listener.ora" and "TNSnames.ora" file…

Baburao A
- 21
- 1
- 2
2
votes
4 answers
Properly disposing of a DbConnection
I have a class called DatabaseHelper that wraps a DbConnection. What's the proper way to setup this class for a using statement? I have implemented IDisposible, but I'm not sure when and where I should be calling Connection.Close() or…

David Brown
- 35,411
- 11
- 83
- 132
2
votes
1 answer
How does DataReader (DbCommand) handle DB communication?
In a software which I'm trying to understand, the DataReader class is received from a IDbCommand-type (inherited) via ExecuteReader().
I'm pretty new to C# and database communication, so: How does DataReader handle the communication with a…

Mattedatten
- 69
- 6
2
votes
4 answers
Working with database in the OnExecute event (Indy)
i have a server with these codes :
procedure TFrmMain.TCPServerExecute(AContext: TIdContext);
begin
Res := DoRegister(Name,Family,Username,Password);
end;
function TFrmMain.DoRegister(Name,Family,Username,Password:string): bool;
var
Qry:…

Kermia
- 4,171
- 13
- 64
- 105
2
votes
1 answer
DatabaseMetaData().getTables() - is very slow any alternative?
DatabaseMetaData().getTables() - is very slow, Is there any alternative of this?
Following is my actual code :
connection.getMetaData().getTables(null,null,null,new String[] {"TABLE", "VIEW"} );

Muhammad Iqbal
- 144
- 1
- 1
- 12
2
votes
1 answer
Multiple database connection Yii2 not working
Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
$params = require(__DIR__ . '/params.php');
$db = require(__DIR__ . '/db.php');
$dbPusat = require(__DIR__ . '/dbPusat.php');
$dbPaperless = require(__DIR__ . '/dbPaperless.php');
return [
…

Maulana Yusuf
- 337
- 2
- 4
- 16
2
votes
2 answers
How to connect to a MongoDB database, in Android?
This is how I add a Java driver to my project
compile 'org.mongodb:mongo-java-driver:2.13.2'
after I run my Android app Gradle crushes.
if I add the jar directly, my app crushes anyway.
Connection code below:
MongoClient mongoClient = new…

TooLazy
- 836
- 4
- 11
- 29
2
votes
2 answers
ASP.NET Sql Provider
I got a problem. When i'm creating the new project in ASP.NET using VS 2010, it's web.config with a default connection string about SQL Express created. But i haven't even got SQL Express installed. What should i do to change the default…

Proton
- 236
- 1
- 7
- 17
2
votes
1 answer
Closing DbConnection Created by Function
Perhaps this is the complete wrong way of doing things, and if so could you perhaps point me in the correct (elegant) way. :)
I have a module in my vb.net project. The module deals with db connections. The idea is for other modules to make use of…

Rico Strydom
- 537
- 1
- 6
- 26
2
votes
1 answer
Multiple data sources (ODBC, OleDB, SQL) with one class
I want to be able to get data from multiple data sources with the same code. Inside my program I get several connection string for different data sources (propably ODBC, OLE DB and SQL).
Now I don't want to write seperate code for every data…

user2743434
- 104
- 1
- 8
2
votes
1 answer
Register abstract class with autofac
I just run this code in a quickly made console app with autofac assembly added:
builder.RegisterType().As().WithParameter("connectionString", connectionString);
There was no exception although DbConnection is of…

Elisabeth
- 20,496
- 52
- 200
- 321
2
votes
1 answer
DbConnection.StateChange not called when connection is disposed?
I have a singleton database class which may be accessed from hundreds of threads simultaneously. Each thread gets its own connection. Since I cannot control the number of threads, I need to limit the number of concurrent connections. I decided to…

l33t
- 18,692
- 16
- 103
- 180
2
votes
3 answers
When using "DbConnection" should I use "using" or try-catch-finally to use DbConnection.close() to close the connection?
I was searching the web for a while now. But didn't find any clear answer to my question. Whether when connecting to a database I should use "using" or I can just go with try-catch-finally? What I mean is:
I don't know if I should call the dispose…

Sergey Rotbart
- 319
- 3
- 12
2
votes
2 answers
Mongo DB pool connection error
I am using mongoDb with java. I am getting the following error while inserting data. Any help would be appreciated. Thanx
Jul 4, 2012 1:45:32 PM org.xsocket.connection.HandlerAdapter performOnData
WARNING: [6f829b013850ff7914137a5cceC291] closing…

shalki
- 890
- 3
- 14
- 31
1
vote
2 answers
Is there a way of connecting to shared OpenEdge RDBMS with read only access?
Our new security policies require data access restriction for developers to the production database. Setting up -RO parameter does not work for several reasons (extracts from 'Startup command and Parameter reference'…

Daria Trainor
- 5,545
- 4
- 23
- 30