database-connection

Read connection from appsettings.json in .net core 1.1 web api

亡梦爱人 提交于 2019-12-24 10:13:32
问题 I am create a web api project in .net core 1.1 but problem is when its try to read connectionstring from appsettings.json an exception occurs . System.IO.FileNotFoundException: 'The configuration file 'appsettings.json' was not found and is not optional. The physical path is 'C:\Test\netCoreWebApi\netCoreWebApi\bin\Debug\netcoreapp1.1\appsettings.json'.' Startup.cs public class Startup { public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env

C#/Oracle: Connect

回眸只為那壹抹淺笑 提交于 2019-12-24 09:43:44
问题 i've been trying to find out how to connect a c# program with an oracle 10g db. all code examples i found always used either ado.net oracleclient of .net-framework (which is deprecated -> not good), or system.data.ado, which apparently uses a data source (odbc) -> not allowed to use, or the oracle developer tools odt (like odbc?), which support olny visual studio 2005 for 10g and only 11g for vs 2010... is there any way to connect, like it is possible with delphi (devart, odac), which ive

How to connect to Teradata with C++ on linux

て烟熏妆下的殇ゞ 提交于 2019-12-24 09:08:16
问题 Simple Problem: I want to connect my linux based C++ program to a Teradata database. How do I accomplish this? I searched the web but I only found some ADO and ODBC based solutions for .net or JDBC drivers. Is there any lib out there that can do the job on linux without ODBC and .net? Greetings, Lars 回答1: Teradata Call-Level Interface Version 2 Reference for Network Attached Systems - Documentation Teradata Developer Exchange - Downloads - You can download the CLI for Linux, Windows, Solaris,

Different persistence units for different Maven profiles

元气小坏坏 提交于 2019-12-24 09:07:11
问题 I want to use two different databases depending on the selected Maven profile. For the profile "production" I want to use a MySQL database and for the "development" profile I want to use an in-memory HSQLDB. I found out that it is possible to have two persistence.xml files. One in "src/main/resources/META-INF" and the other one stored in "src/test/resources/META-INF". This gives the possibility to choose a different database for testing. But is it also possible to do the database selection

Connecting to SQL Server Database using a Hosted Web Application

六月ゝ 毕业季﹏ 提交于 2019-12-24 08:23:56
问题 I have created a .net web application using c# that inserts, updates, and deletes data from an SQL server database. I have tested it using my localhost and it works fine. Now I would like to publish this application on a hosted site. My question is, does the database need to be on the same server/host that the application is in for it to connect? Does anyone have any tips on how to implement this? 回答1: If your Question is 'How to connect database present on another server', then you have to

server.tomcat.max-threads VS corePoolSize VS spring.datasource.tomcat.max

匆匆过客 提交于 2019-12-24 08:17:41
问题 I've an Spring Boot REST async application, wanna adjust: Connections threads from clients (wanna REST request go in parallel) Thread numbers for @Async methods in my service tier pool of connections to DB Browsing documentations and sites found possibilities: corePoolSize value=... VS server.tomcat.max-threads = ... - What is the difference? spring.datasource.hikari.maximum-pool-size= ... VS spring.datasource.tomcat.max... = ... - What is the difference? 回答1: Assuming you are using Spring

Having sql connection open for a long time

不打扰是莪最后的温柔 提交于 2019-12-24 07:19:39
问题 I'm writing a program that generates Sitemaps. To avoid duplicates I'm using MSSQL Server to store links that are found. during this process It may read and write millions of links and the process of reading and writing may have very little gaps between them (I mean the time between each access to database is very tiny). I want to know If I can open the connection when the program starts and close it at the end. please consider that creating some sitemaps may take days to finish. Or is it

Entity Framework unable to delete database, database in use

对着背影说爱祢 提交于 2019-12-24 05:58:19
问题 I am (like many others) running into the problem that I can't get my NUnit tests to delete the database in the [SetUp] of my test fixture. What I want to achieve I want to write integration tests that test my code and verify if the expected results are stored in the database (Assert CRUD methods). That, and I want to be able to actually show the tables in SqlServer and see how the results in the database look like. That last part seems a hard thing to achieve... What is going wrong I can run

Connecting Android application to BlueMix stored DB2 Database

烂漫一生 提交于 2019-12-24 03:42:39
问题 How can I connect an Android application to a DB2 database stored in BlueMix? I know that some Java libraries are missing in Android, so I can't use JDBC to connect to the database. Any Idea? 回答1: You can not talk directly to the SQL DB on Bluemix from your android app. You will need to create an intermediary application on bluemix that talks to the db and your android app can talk to that application. You can implement this backend as a RESTful API (Java JAX-RS, Node.js w/ Express etc). The

Recommendation for Embedded DB with External ODBC Access?

﹥>﹥吖頭↗ 提交于 2019-12-24 03:08:15
问题 Is there a database that can be embedded in a Java program but also allow access through ODBC; more specifically, ODBC through ADOdb? The environment is MS Windows (XP on). The situation is that a Java program (mine) runs an external program (not mine) that uses an ADOdb.Connection object to connect to the embedded database and extract data. Oh, legacy support. I've been trying to set this up using Derby (i.e. JavaDB/Cloudscape) and the NetworkServerControl object, but cannot figure out how