Mono + Mysql = Slow - Inserts 26,000 Records Into A Mysql Database

Dec 16, 2010

Why does a very simple script which inserts 26,000 records into a mysql database (myisam, no transactions) take 13 seconds in the php implementation, and then 35-50 seconds using mono+mysql connector? I thought asp.net was faster than php? Could the problem be the mono mysql connector is "platform independent", so the performance just stinks? or does asp.net suffer more overhead than php when it comes to executing each query? Aren't there any native linux binaries for mysql connector for mono that may be faster?

View 1 Replies


Similar Messages:

Databases :: Using Mysql Installed Mysql And Mysql Net Connector?

Dec 26, 2010

i was just using mysql i installed mysql and mysql net connector. its installed successfully but unable tp add to references.

View 3 Replies

DataSource Controls :: Importing Excel Records Into MySql Database Tables

Mar 18, 2010

My prob Is I have Excel files in my folder i need to Store the Records into Database Table. iam using VS.2005,c#.net,Asp.net ,Mysql 5.0

View 1 Replies

Error "[42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]" In C# Code (mysql Database Connection)

Dec 21, 2010

My code is to update a record if it already exists in database else insert as a new record. My code is as follows:

protected void Button3_Click(object sender, EventArgs e)
{
OdbcConnection MyConnection = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=testcase;User=root;Password=root;Option=3;");
MyConnection.Open();
String MyString = "select fil_no,orderdate from temp_save where fil_no=? and orderdate=?";
OdbcCommand MyCmd = new OdbcCommand(MyString, MyConnection);
MyCmd.Parameters.AddWithValue("", HiddenField4.Value);
MyCmd.Parameters.AddWithValue("", TextBox3.Text);
using (OdbcDataReader MyReader4 = MyCmd.ExecuteReader())
{
//**
if (MyReader4.Read())
{
String MyString1 = "UPDATE temp_save SET order=? where fil_no=? AND orderdate=?";
OdbcCommand MyCmd1 = new OdbcCommand(MyString1, MyConnection);
MyCmd1.Parameters.AddWithValue("", Editor1.Content.ToString());
MyCmd1.Parameters.AddWithValue("", HiddenField1.Value);
MyCmd1.Parameters.AddWithValue("", TextBox3.Text);
MyCmd1.ExecuteNonQuery();
}
else
{
// set the SQL string
String strSQL = "INSERT INTO temp_save (fil_no,order,orderdate) " +
"VALUES (?,?,?)";
// Create the Command and set its properties
OdbcCommand objCmd = new OdbcCommand(strSQL, MyConnection);
objCmd.Parameters.AddWithValue("", HiddenField4.Value);
objCmd.Parameters.AddWithValue("", Editor1.Content.ToString());
objCmd.Parameters.AddWithValue("", TextBox3.Text);
// execute the command
objCmd.ExecuteNonQuery();
}
}
}

I am getting the error as: ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order,orderdate) VALUES ('04050040272009',' &' at line 1

The datatype for fields in table temp_save are:

fil_no-->INT(15)( to store a 15 digit number)
order-->LONGTEXT(to store contents from HTMLEditor(ajax control))
orderdate-->DATE(to store date)

View 2 Replies

Forms Data Controls :: Display Records In Bold Coming From Mysql Database

Sep 5, 2010

I have Mysql database.In that some records status is New.now,I bind database table to Listview(asp) control.

What's my problem is,the New status records(from Mysql database) text in Listview(after binding) is visible in
bold format.

View 1 Replies

Mysql - Login Page Loads Very Slow Takes 30 Secs?

Nov 3, 2010

We have ASP.NET Application in Test server. For first time access the Login page of that application load time is slow. Response time is around 25-30 sec. After that I refershed the page or Opened with a new browser, loading of Login Page is around 1-2 sec.

Only user name & password columns are there in login page. Is there any way I can reduce the response time for first time loading?

underline db mysql. we are using godaddy virtual server windows.

View 4 Replies

Databases :: MYSQL Using VB With VWD2008 For MYSQL Data Transactions

Jan 11, 2010

I have used ASD.NET code using SQL Database for Transaction operation successfully. By changing the Database Code to interface with MYSQL an Error occurs. If I remove the Transaction Code from within the the application, it works OK by displaying the MYSQL data (Read Only) in the layout of the application. I am using Mysql Essential-4.1.22-win32 and MYSQL Connector ODBC-3.51.2. My objective is to EDIT the MYSQL Data.

View 8 Replies

Insert Html Pages To MySQL - Error "check Manual That Corresponds To MySQL Server Version For The Right Syntax"

Oct 7, 2010

I am trying to insert html pages to MySQL with my Asp.NET project but i am getting error; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de Osman patlaması', '', '<div style="text-align: center"> <img src="/i' at line 1

How can i fix that problem my server side code is;

MySqlConnection myCon = new MySqlConnection();
myCon.ConnectionString = ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
MySqlCommand cmd = new MySqlCommand();
cmd.CommandType = CommandType.Text;
string query = @"INSERT INTO `test`.`posts` (`id`, `author`, `title`, `description`, `content`, `ispublished`, `iscommentsenabled`, `pubDate`, `lastModified`, `raters`, `rating`, `slug`, `tags`, `categories`) VALUES (NULL, '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}')";
query = String.Format(query, p.author, p.title, p.description, p.content, p.ispublished, p.iscommentsenabled, p.pubDate, p.lastModified, p.raters, p.rating, p.slug, p.tags, p.categories);
cmd.CommandText = query;
cmd.Connection = myCon;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();..............

View 2 Replies

Databases :: Delete Duplicate Records From MySQL Table?

Sep 20, 2010

I have Revision column in Quote table with time stamp (MySql table) now i am viewing the entire date and time my end user want to view only Date he doesnot want to see time how can i pull only date.i am displaying revision column in two ways one in grid view and another one in field value

Query in my Grid view

Dim query As String = "SELECT QuoteNumber,Revision,Vendor,PartNumber,status,Customer,Requestor from quotes"

On select check box in grid view, filed values will be loaded with data.

field value

txtRev.Text = dt.Rows(indx)("Revision").ToString()

View 3 Replies

Databases ::asp.net 2010 And Mysql Are Practical For 10 Million Records ?

Aug 12, 2010

I am developing a large e-commerce system.

I am using asp.net 2010 with mysql database. Is it practical for large amounts of data ? say 10 million records ? cuz some people said to me that using this combination, i'll be having performance issues as database grows.

View 4 Replies

Databases :: MySql Transaction Inside A Loop - Delete A Bunch Of Records

Sep 30, 2010

I'm trying to delete a bunch of records in mysql. The record info to delete (userid, name) is stored in an arraylist. It seems to only delete the first record and gives an error ("Transaction has already been rolled back or is not pending.") afterwards. I have the transaction commit inside the loop which I think is the issue but not sure how to go further if I bring it outside of the loop. Here's the relevant bits of the code.

try
{
ArrayList alist = new ArrayList();
//alist gets populated with data like (12345,robot)(23456,car) here.
MySqlConnection conn2 = new MySqlConnection(query_connection);
conn2.Open();
MySqlCommand command2 = conn2.CreateCommand();
MySqlTransaction mytransaction;
mytransaction = conn2.BeginTransaction();
command2.Transaction = mytransaction;
for (int i = 0; i < alist.Count; i++)
{
string[] s = alist[i].ToString().Split(',');
try
{
command2.CommandText = "DELETE from users_settings WHERE UserID=" + s[0].ToString();
command2.ExecuteNonQuery();
command2.CommandText = "DELETE from users WHERE ID=" + s[0].ToString();
command2.ExecuteNonQuery();
mytransaction.Commit();
}
catch (Exception e){
mytransaction.Rollback();
}
}
}
catch(Exception e){
}

View 1 Replies

ADO.NET :: How To Use MySQL As Database Server

Feb 10, 2011

I want to use MySQL as database server for my ASP.net website but don't know how can I write connection string for connecting database.

View 1 Replies

Connecting To A MySQL Database Using C#?

Feb 20, 2011

I've installed the Components from the links below. But I still can't find any SQL references when I try to add them? I'm wondering if anyone would know the reason for this? I just started with asp.net. I've found several other questions regarding code for connecting but I can't find anyone who've had trouble with the Connector/components before?

MYSQL connector

[URL]

Microsoft Data Access Components (MDAC) 2.8

[URL]

View 2 Replies

Change The Database To MySQL?

Feb 5, 2010

I'm interesting in deploy the .net authentication system but with a little changes. The first thing is changing the database that it uses by default to MySQL database.I'm not wondering in how/what to change on the web.config rather how to get the scripts that build all the database that it need(tables and so..).
After that I'll expend the user profile, maybe the roles and that enough for my website.So how to do a full move to MySql DB?

View 1 Replies

Convert MDF To MySQL Database?

Dec 20, 2010

How to convert ASPNETDB.MDF mssql database to MySql which works with ASp.NET

View 1 Replies

Databases :: Use MVC 2 With MySQL Database?

Jun 15, 2010

I want to use MVC 2 with MySQL database. Is it possible?because my shared hosting limits the size of SQL Server database, but there is no limit on Size of MySQL database.MySQL seems to take less disk space than SQL Server database which is costly on the Internet.

View 1 Replies

C# - Get Data From Mysql Database?

Apr 13, 2010

How get data from mysql database? I use ASP.NET and C#.Previously, I used LINQ but it does not work with mysql database

View 2 Replies

DataSource Controls :: How To Transfer Database From Mysql To Sql Server Database

May 10, 2010

I have some data which is in mySQL, i am not familier with mySQL, i would like to transfer all the data from MySQL to SQL Server database,

View 11 Replies

Databases :: Update MySQL-database / Database Doesn't Get Updated

Mar 26, 2010

protected void Button3_Click(object sender, EventArgs e)
{
//Create a connection to the database
MySqlConnection conn = new MySqlConnection("Database=kid07025;Data Source=195.178.228.254;User Id=kid07025;Password=********");
//open the connection
conn.Open();
//MySQL Query which updates the row where Anvandarnamn = Anvandarnamn (recieved from a cookie)
MySqlCommand cmd = new MySqlCommand("UPDATE personer SET Information=?Information,Fnamn=?Fnamn,Enamn=?Enamn,Personnr=?Personnr,Adress=?Adress,Postnr=?Postnr,Ort=?Ort WHERE Anvandarnamn=?Anvandarnamn", conn);
// Update with new text
cmd.Parameters.AddWithValue("?Anvandarnamn", Request.Cookies["Anvandarnamn"].Value);
cmd.Parameters.AddWithValue("?Information", TextBox1.Text);
cmd.Parameters.AddWithValue("?Fnamn", TextBox2.Text);
cmd.Parameters.AddWithValue("?Enamn", TextBox3.Text);
cmd.Parameters.AddWithValue("?Personnr",TextBox4.Text);
cmd.Parameters.AddWithValue("?Adress", TextBox5.Text);
cmd.Parameters.AddWithValue("?Postnr", TextBox6.Text);
cmd.Parameters.AddWithValue("?Ort", TextBox7.Text);
cmd.ExecuteReader();
conn.Close();
RefreshProfile();
}

I don't know what I am doing wrong here, but the database doesn't get updated when I press the button.

I use VS 2010, ASP.NET

View 3 Replies

Publishing Website And MySQL Database?

Dec 5, 2010

This is what my website looks like:

When I build the website and upload everything as it is, I get this error:

Quote:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I guess I have to deploy Database, or?

View 10 Replies

Search Mysql Database With Textbox

Feb 17, 2010

i have connected mysql table in gridview, how to do search by using the particular word from the text box and any ways to get the result in grid view

View 2 Replies

How To Protect A MySQL Database With A Password

Dec 4, 2010

Code:
Sub btnLogin_OnClick(Src As Object, E As EventArgs)
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
[code]....

I found this code for user authentication. How secure is this? Can this be bypassed? Can I protect a MySQL database with a password? Can people see a MySQL database's data if it's not protected?

View 19 Replies

Databases :: Connection To MySQL Database

May 15, 2010

I did all the instructions which are in the following link: [URL] in order to do a connection between MySQL database and ASP.NET but I did not successed. Sometimes, it told me that I have a mistake in the <asp: button> and sometimes it told me that I did a mistake in calling (addImage) method. And this is my whole code:-

&#65279;<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HW5._Default" %>
<script>
public class DataAccess
{
private string _strConn =
@"Driver= {MySQLODBC 3.51 Driver};SERVER=localhost;DATABASE=test1;";
private OdbcConnection _objConn;
public DataAccess()
{
this._objConn = new OdbcConnection(this._strConn);
}
// This function adds the Images to database
public string addImage(timestamp id, byte [] data,string extension)
{
string strSql = "SELECT * FROM File";
DataSet ds = new DataSet("Image");
OdbcDataAdapter tempAP = new OdbcDataAdapter(strSql,this._objConn);
OdbcCommandBuilder objCommand = new OdbcCommandBuilder(tempAP);
tempAP.Fill(ds,"Table");
try
{
this._objConn.Open();
DataRow objNewRow = ds.Tables["Table"].NewRow();
objNewRow["Extension"] = extension;
objNewRow["Data"] = buffer;
objNewRow["ID"] = id;
ds.Tables["Table"].Rows.Add(objNewRow);
// trying to update the table to add the image
tempAP.Update(ds,"Table");
}.....................................

View 4 Replies

Databases :: How To Connect Mysql Database

Jun 11, 2010

how to connect mysql database in asp.net?

I am install mysql 5.0 then i install sqlyog.

After that i create the database sample in mysql with the help of sqlyog.

I want to connect the database in asp.net & display it on gridview.

[Code]....

How we set the connection string in mysql for use on aspx page?

View 1 Replies

C# - Shared MySQL Database For Java

Oct 27, 2010

I recently developed a Java Application for a client with MySQL database. Now he wants to have ASP.NET website connected with the Java Application. I'm thinking of placing the database on a local server which would support both the desktop application and the website. What i want to know is, is it the good way to handle these kind of scenario or is there any standard method?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved