database-connection

Caching MongoDB connections in Django

∥☆過路亽.° 提交于 2020-01-22 19:44:10
问题 I'm using the standard (as opposed to NonRel) version of Django connected to PostgreSQL on top of Apache + mod_wsgi. This setup also connects to MongoDB (some data is saved externally). Right now I have to create a new MongoDB connection for each Django request, and pass it along throughout the call stack to all functions that require access to MongoDB. Is there a way to cache connections between requests? Edit At the risk of blasphemy, would a global variable work in this case? 回答1: There

How to dynamically change crystal report database connection

▼魔方 西西 提交于 2020-01-22 15:11:23
问题 I am new with crystal reports. I tried to to implement the crystal report in my win form c# application using report wizard visual studio 2012, so don't know what happen's in backhand for this. Everything works good on my computer but when i tried install this on another computer connection string changes and gives error. I tried many links like Dynamic Connection string Change but as i am using report wizard for setup so don't know where to use this. I also tried all options in report wizard

How to dynamically change crystal report database connection

随声附和 提交于 2020-01-22 15:09:57
问题 I am new with crystal reports. I tried to to implement the crystal report in my win form c# application using report wizard visual studio 2012, so don't know what happen's in backhand for this. Everything works good on my computer but when i tried install this on another computer connection string changes and gives error. I tried many links like Dynamic Connection string Change but as i am using report wizard for setup so don't know where to use this. I also tried all options in report wizard

Remote MySQL Connection in PHP

夙愿已清 提交于 2020-01-21 12:15:09
问题 I'm beginning to migrate a software project from being a desktop application to a web application. Currently I am using a local PHP/MySQL connection that is associated with the desktop it is installed on. I'm hoping to untangle this and am trying to create a MySQL database through my 1and1 account. I had no trouble creating a database and recorded my account information. I'd like to be able to edit this database using PHP scripts on my system. However, I haven't been able to get a working

Remote MySQL Connection in PHP

↘锁芯ラ 提交于 2020-01-21 12:15:07
问题 I'm beginning to migrate a software project from being a desktop application to a web application. Currently I am using a local PHP/MySQL connection that is associated with the desktop it is installed on. I'm hoping to untangle this and am trying to create a MySQL database through my 1and1 account. I had no trouble creating a database and recorded my account information. I'd like to be able to edit this database using PHP scripts on my system. However, I haven't been able to get a working

Listing table results in “CREATE TABLE permission denied in database” ASP.NET - MVC4

♀尐吖头ヾ 提交于 2020-01-21 03:00:13
问题 I'm using ASP.NET MVC 4 - c# to connect to a live database, and list the results, however when I go to view the page it returns the following error: CREATE TABLE permission denied in database 'DatabaseName'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: CREATE TABLE permission denied in

Does closing a database connection in Dispose method is right?

断了今生、忘了曾经 提交于 2020-01-20 04:14:44
问题 I've had a suspicion that a database connection used in one of our applications is not always closed. I went to see the code and I've found a class DataProvider that has SqlConnection object. The connection is opened in the constructor of this class and closed in it's Dispose method (don't judge that, I know keeping an open connection is evil, it's just not my code and it's not the point of the question anyway). The Dispose method is implemented like this: protected virtual void Dispose(bool

Error - SQL coding as “Application-defined or object-defined error”

ε祈祈猫儿з 提交于 2020-01-17 05:37:17
问题 I am relatively experienced in VBA coding, but I am totally new in MS SQL server 2008. I am trying to export an Excel table like below to a SQL server: A B C D E 1 Name Year ID 2 Jill 2015 17 3 Jack 2012 13 4 Mike 1999 25 5 My code below, first creates and opens a connection, then creates a table from the Excel-sheet (Sheet2), then it copies this table to my SQL-server. However, I am getting error like "Application-defined or object-defined error" for the code-line MyWorkBook.CurSheet

check connection from C# app to oracle 10g database

空扰寡人 提交于 2020-01-17 02:40:07
问题 How can I check connection from C# app to oracle 10g database? For example I have Oracle server on machine with IP 10.50.65.2. I maintain IP, Port in app.config. I move app to another pc connected to another network. I need check if it is possible create correct connection with database server. If it is not possible create db connection I need show only simple message please modify db connection data in app.config. 回答1: Why don't you just try to create the connection and catch the exception

Swapping assemblies to implement DBMS-specific functionality

纵然是瞬间 提交于 2020-01-16 14:48:12
问题 (continuation of my question here, but thought it was different enough to start a new thread) I want to write an application that will allow the eventual customers to use their preferred DBMS (SQLServer, Oracle, etc) for the backend. I could have the main app call a "Factory" object, located in a separate assembly, that will return a DBMS-specific object that implements a common interface containing all the calls required for DB access. However, this means having the compiled code for all