ado.net

System.Data.SqlClient Namespace for MySQL?

£可爱£侵袭症+ 提交于 2020-01-04 07:18:46
问题 The exception says that there is a network related problem, or that the SQL server does not allow remote access, none of those are true. Can it be that I'm trying to connect a MySQL server, and not MS SQL? Thanks 回答1: It is because the System.Data.SqlClient namespace is designed for Microsoft SQL Server, to connect to MySQL you will need to download and reference the MySQL .NET Connector http://dev.mysql.com/downloads/connector/net/. You will then use the System.Data.MySqlClient namespace.

ODBC connection to MySQL won't add values

狂风中的少年 提交于 2020-01-04 06:58:53
问题 I'm trying to insert values from my asp.net application into my MySQL database. On the register page people can fill in Name and Pass and press submit. Public Function InsertMember(ByVal objMember As Member) As Boolean myconn.Open() Dim cmd As New OdbcCommand("INSERT INTO member(Name, Pass) VALUES (@Name,@Pass)", myconn) cmd.CommandType = CommandType.Text cmd.Parameters.Add("Name", OdbcType.VarChar).Value = objMember.Name cmd.Parameters.Add("Pass", OdbcType.VarChar).Value = objMember.Pass cmd

Long time to load first sql connection in .NET

ε祈祈猫儿з 提交于 2020-01-04 06:41:10
问题 For some reason it takes 7 seconds to open a connection to a sql server database for the firt time, subsequent connections takes a second. any idea what could be the reason? I'm using C# and asp.net Its after compilation, i essence every time i restart the site, which means every time it needs to actualy create the "first" connection. i understand that setting up connection pooling has overhead, but i have never seen that i should take 7 second to set it up. 回答1: As well as connection pooling

Long time to load first sql connection in .NET

耗尽温柔 提交于 2020-01-04 06:40:34
问题 For some reason it takes 7 seconds to open a connection to a sql server database for the firt time, subsequent connections takes a second. any idea what could be the reason? I'm using C# and asp.net Its after compilation, i essence every time i restart the site, which means every time it needs to actualy create the "first" connection. i understand that setting up connection pooling has overhead, but i have never seen that i should take 7 second to set it up. 回答1: As well as connection pooling

Long time to load first sql connection in .NET

这一生的挚爱 提交于 2020-01-04 06:40:06
问题 For some reason it takes 7 seconds to open a connection to a sql server database for the firt time, subsequent connections takes a second. any idea what could be the reason? I'm using C# and asp.net Its after compilation, i essence every time i restart the site, which means every time it needs to actualy create the "first" connection. i understand that setting up connection pooling has overhead, but i have never seen that i should take 7 second to set it up. 回答1: As well as connection pooling

SQLite connection not appearing for VS2015

青春壹個敷衍的年華 提交于 2020-01-04 05:58:12
问题 I have a similar problem with what is posted here: SQLite connection not appearing in Entity Data Model Wizard Except that I use VS2015 and I cannot even see the connection for SQLite in my Server Explorer: I already install System.Data.SQLite from nuget and using Entity Framework 6.1.3 and this setup: sqlite-netFx46-setup-bundle-x64-2015-1.0.102.0 which is available in: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki But the option just doesn't appear. 回答1: The problem

SQLite connection not appearing for VS2015

依然范特西╮ 提交于 2020-01-04 05:57:46
问题 I have a similar problem with what is posted here: SQLite connection not appearing in Entity Data Model Wizard Except that I use VS2015 and I cannot even see the connection for SQLite in my Server Explorer: I already install System.Data.SQLite from nuget and using Entity Framework 6.1.3 and this setup: sqlite-netFx46-setup-bundle-x64-2015-1.0.102.0 which is available in: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki But the option just doesn't appear. 回答1: The problem

Writing to a blank excel sheet with ADO.NET

偶尔善良 提交于 2020-01-04 05:31:16
问题 I am trying to use ADO.NET to connect to and write to an excel file. I have created a blank file with the default excel sheets (I have also tried with a custom sheet.) For some reason I am unable to write a full row of data to the sheet. If I create a new sheet it works fine, however then I have too many sheets and I am unable to delete any sheets. Is there something special you need to do to write a row of data to a blank sheet? I try to do: path= the path including my file. connString =

How to use DataAdapter.Fill() asynchronously?

女生的网名这么多〃 提交于 2020-01-04 05:31:10
问题 I have a DataAdapter that is filling 5 DataTables in a DataSet. SqlDataAdapter da = new SqlDataAdapter("Select * from testTable",con); da.Fill(ds, 0, numberOfRowsToPutInEachDataTable, "DT1"); da.Fill(ds, numberOfRowsToPutInEachDataTable , numberOfRowsToPutInEachDataTable , "DT2"); da.Fill(ds, numberOfRowsToPutInEachDataTable* 2, numberOfRowsToPutInEachDataTable, "DT3"); da.Fill(ds, numberOfRowsToPutInEachDataTable * 3, numberOfRowsToPutInEachDataTable, "DT4"); da.Fill(ds,

Writing to a blank excel sheet with ADO.NET

可紊 提交于 2020-01-04 05:31:06
问题 I am trying to use ADO.NET to connect to and write to an excel file. I have created a blank file with the default excel sheets (I have also tried with a custom sheet.) For some reason I am unable to write a full row of data to the sheet. If I create a new sheet it works fine, however then I have too many sheets and I am unable to delete any sheets. Is there something special you need to do to write a row of data to a blank sheet? I try to do: path= the path including my file. connString =