connection-string

How can I get a connection URL from an SQLAlchemy Engine instance?

笑着哭i 提交于 2020-02-03 08:25:06
问题 I begin a program by generating a URL object and passing it to create_engine. In a section of code far, far away I would like to find out what this engine is connected to, i.e. the connection URL. Is there an easy way to do this? Using inspect I can only see how to get the driver type. I can understand if the password component of a connection string was no longer available, but I'm hoping everything else is still available. Any ideas? 回答1: This works quite well for me: log.info("* Using DB:

asp.net / MySQL: Access denied for user ''@'localhost' (using password: NO)

血红的双手。 提交于 2020-01-30 02:39:14
问题 I'm a web dev rookie and I'm hoping someone with more experience can help sort this out. I was ambushed by a MySQL upgrade. Background: I have two XP PCs (let's ambitiously call them "web server" and "MySQL server"). I recently built and successfully hosted an asp.net site that drew data from the MySQL db. It's just a site designed for a few local users so they don't have to learn SQL to get data...nothing fancy. So far so good. Problem: This week I installed MySQL on the "web server", and

keyword not supported data source

耗尽温柔 提交于 2020-01-26 15:13:32
问题 I have an asp.net-mvc application with the default membership database. I am accessing it by ADO.NET Entity Framework. Now I want to move it to IIS, but several problems showed up. I had to install SQL Server Management Studio, Create new DB, import there all the data from the previous .MDF file. Only thing left to do (as far a I know) is to change to connection string. However, I am not really experienced with this and keep getting the Keyword not supported: 'data source'. exception. Here is

Create a jTDS connection string

萝らか妹 提交于 2020-01-26 09:38:20
问题 my sql server instance name is MYPC\SQLEXPRESS and I'm trying to create a jTDS connection string to connect to the database 'Blog'. Can anyone please help me accomplish that? I'm trying to do like this: DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1433/Blog", "user", "password"); and I get this: java.sql.SQLException: Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:395) at net.sourceforge.jtds.jdbc

Configuring MVC for SimpleMembership

依然范特西╮ 提交于 2020-01-26 01:35:33
问题 I have an ASP.NET MVC application with a number of membership-related pages generated from the project templates. When I attempt to access one of those pages, I get the following error: The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588. After some time spent researching, I determined I was missing the connection string. I have an existing connection string named FreeWebFilesEntities and I created a

Create a jTDS connection string in Python

大憨熊 提交于 2020-01-25 08:44:30
问题 I'm trying to establish a jTDS connectivity using Python. Can anyone please help me in accomplishing that? From the SQL Server, I generally connect using the below connection string: jdbc:jtds:sqlserver://DBServer:port/DBInstance;useNTLMv2=true;domain=Domain I'm trying to do as below in Python: import pyodbc conn = pyodbc.connect('Driver={SQL Server};' 'Server=DBName,port;' 'Database=database;' 'Truster_Connection=yes;' 'uid=user;' 'pwd=password;' ) cursor = conn.cursor() cursor.execute(

Create a jTDS connection string in Python

江枫思渺然 提交于 2020-01-25 08:44:28
问题 I'm trying to establish a jTDS connectivity using Python. Can anyone please help me in accomplishing that? From the SQL Server, I generally connect using the below connection string: jdbc:jtds:sqlserver://DBServer:port/DBInstance;useNTLMv2=true;domain=Domain I'm trying to do as below in Python: import pyodbc conn = pyodbc.connect('Driver={SQL Server};' 'Server=DBName,port;' 'Database=database;' 'Truster_Connection=yes;' 'uid=user;' 'pwd=password;' ) cursor = conn.cursor() cursor.execute(

How to get connection string from head project's app.config/appsettings.json in a class library

耗尽温柔 提交于 2020-01-24 17:33:26
问题 When writing a C# class library that accesses a database, my preferred method of getting a connection string from a head project's app.config/appsettings.json is to have the DB access classes depend on some IConnectionString interface that is registered in an IOC container by the head project. I am currently using F# however, and the above is not a particularly functional approach. Neither is having a static variable on a static class set by the Startup class of the head project (though it's

C# Generate Azure Table Storage ConnectionString

ぐ巨炮叔叔 提交于 2020-01-24 00:26:14
问题 I want to generate connectionString for azure table storage using azure subscriptionId and azureApiKey. I found the following Microsoft library: https://github.com/Azure/azure-libraries-for-net/tree/master but can't understand how can I generate connectionString here. I can't even find appropriate method for it. Do I need additional data to generate ConnectionString? 回答1: Do I need additional data to generate ConnectionString? Preparation: 1.Registry an app in the Azure AD and create service

Vb.net Connection String for Ms Access Database

半腔热情 提交于 2020-01-21 10:30:12
问题 What is the connection string for connecting MS Access 2010 (.accdb) database in VB.net. 回答1: connectionstrings.com is a wonderful thing: Standard security Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False; With database password This is the connection string to use when you have an Access 2007 database protected with a password using the "Set Database Password" function in Access. Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C: