connection-string

Connecting to local instance of PostgreSql with JDBC

大憨熊 提交于 2021-02-06 09:47:28
问题 I have a running local instance of PostgreSql on a linux machine. When I use psql command from the shell I success to log in without any problem. I need to connect to the PostgreSql via the JDBC, but I don't know what exactly should I pass as url parameter to DriverManager.getConnection() . It should start with jdbc:postgresql: but what's going next? I was told by the system group that a database with was created like user name. e.g. if my user is jutky a db named jutky was created, but when

How can I connect with X509 by putting all options in the connection string in node.js driver for mongodb?

白昼怎懂夜的黑 提交于 2021-02-05 09:20:07
问题 I'm using the keys available in mongodb docs for a self-signed certificate using X509 authentication with a Node.js Driver. When trying to connect to the database I get the following error: MongoNetworkError: failed to connect to server [pedro.com:57040] on first connect [MongoNetworkError: unable to verify the first certificate] Despite that error, I am sure that the connection works as I am using Studio 3T and everything is up and running by using the same certificates. So my question is...

Importing Excel into DataGridView

坚强是说给别人听的谎言 提交于 2021-01-29 00:03:32
问题 I'm making a program where two databases are merged together.... I can import an excel spreadsheet into a DataGridView with this code: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.xls;Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""; DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); DbDataAdapter adapter = factory.CreateDataAdapter(); DbCommand selectCommand = factory.CreateCommand(); selectCommand.CommandText = "SELECT *

Importing Excel into DataGridView

我的未来我决定 提交于 2021-01-28 23:59:15
问题 I'm making a program where two databases are merged together.... I can import an excel spreadsheet into a DataGridView with this code: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.xls;Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""; DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); DbDataAdapter adapter = factory.CreateDataAdapter(); DbCommand selectCommand = factory.CreateCommand(); selectCommand.CommandText = "SELECT *

Importing Excel into DataGridView

怎甘沉沦 提交于 2021-01-28 23:56:05
问题 I'm making a program where two databases are merged together.... I can import an excel spreadsheet into a DataGridView with this code: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.xls;Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""; DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); DbDataAdapter adapter = factory.CreateDataAdapter(); DbCommand selectCommand = factory.CreateCommand(); selectCommand.CommandText = "SELECT *

(Maybe) Illegal character in ODBC SQL Server Connection String PWD=

痞子三分冷 提交于 2021-01-28 08:58:15
问题 According to what I have researched there are no illegal characters in the PWD= field of a SQL Server Connection String. However, using SQL Server Express 2008 I changed the SA password to a GUID, specifically: {85C86BD7-B15F-4C51-ADDA-3B6A50D89386} So when connecting via ODBC I use this connection string: "Driver={SQL Server};Server=.\\MyInstance;Database=Master;UID=SA;PWD={85C86BD7-B15F-4C51-ADDA-3B6A50D89386};" But it comes back as Login failed for SA. However, if I change the SA password

(Maybe) Illegal character in ODBC SQL Server Connection String PWD=

僤鯓⒐⒋嵵緔 提交于 2021-01-28 08:49:04
问题 According to what I have researched there are no illegal characters in the PWD= field of a SQL Server Connection String. However, using SQL Server Express 2008 I changed the SA password to a GUID, specifically: {85C86BD7-B15F-4C51-ADDA-3B6A50D89386} So when connecting via ODBC I use this connection string: "Driver={SQL Server};Server=.\\MyInstance;Database=Master;UID=SA;PWD={85C86BD7-B15F-4C51-ADDA-3B6A50D89386};" But it comes back as Login failed for SA. However, if I change the SA password

Keyword not supported: 'attachdbfilename' - MDF Database File (C#)

痞子三分冷 提交于 2021-01-28 04:41:17
问题 I trying connect to my .MDF file but I am not able to accomplish it. I tried various variations of connection strings but still getting this same error. This my connection string from app.config <connectionStrings> <add name="DBConnection" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\iseo-db.mdf;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> and this is how I call this connection string private string connection