Hey all,
I'm using Visual Basic 2008 here, and I'm debugging my code that connects to my SQL Database and writes something in it. It was working fine and all until I came to an error like this. NullReferenceException was unhandled. What's going on? Here is the code I'm working with:
Dim conn As MySqlConnection
conn ...
I've got a pretty complex query in MySQL that slows down drastically when one of the joins is done using an OR. How can I speed this up? the relevant join is:
LEFT OUTER JOIN publications p ON p.id = virtual_performances.publication_id
OR p.shoot_id = shoots.id
Removing either condition in the OR decrea...
Hi,
I have a situation that users access remote MySQL server in C# application.
Basically,
A user using C# application on his/her desktop ->>>> connects to remote ->>>>>>>> [ REMOTE ]
How do I securely hide database connection detail?
I have few ideas, but I don't think they are safe.
Encrypt database connection data into a file a...
I have a table which needs 2 fields. One will be a foreign key, the other is not necessarily unique. There really isn't a reason that I can find to have a primary key other than having read that "every single tabel ever needs needs needs a primary key".
Edit:
Some good thoughts in here.
For clarity's sake, I will give you an example t...
XAMPP is unable to start Apache or MySQL on a windows 7 system when run from a flashdrive.
The control panel indicates that the server is starting, but it never actually comes online. Additionally, the control panel process refuses to end; Task Manager end tasking is required to make it stop.
Is there a specialized setting either in X...
What's the Maximum Value of smallint(6) unsigned in MySQL?
...
I am getting this error while compiling mysql 5.1 source with Archive Storage. Can someone point me to the correct way of enabling archive storage engine?
./configure --prefix=/usr/local/mysql --with-archive-storage-engine
Parse errors: No plan found in TAP output
mysys/my_atomic-t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: No plan fo...
I've read that it isn't a good idea to run SQL queries with ORDER BY RAND() on large databases.
So here's my shot at breaking up the code. The code needs to select 10 random ids from the database, then do a second select to grab the random rows.
$sql = "SELECT id FROM table WHERE image != ''
ORDER BY id DESC LIMIT 50;";
$result ...
hello all
simple question , if i have commercial application and i like to use the free version of mysql db (this is the first time im using it )
what restrictions do i have ?
can i use it , or do i need buy some kind of license .
the url : http://www.mysql.com/about/legal/licensing/index.html
talks about the issue but i could not unde...
hi,
i have this site which keeps on throwing out of memory error based on the error logs. sad thing is i cant reproduce the OOM error both on dev site and production site.
i checked the logs and found out that this only happens when bots crawl the pages throwing the OOM error or if the pages are accessed from google search results.
i...
Hi guys!
I have a file with data in the following format:
<user>
<fname>Anthony</fname>
<lname>Smith</lname>
<accid>3874918</accid>
</user>
<user>
...
</user>
I'm trying to parse this data and store it to MySQL database with the follwing fields: fname, lname, accid.
Now the problem is how to determine <user> and </...
I've changed it in xampp/mysql/bin/my.ini and still, the effect does not show after restarting MySQL. If I run the following command, it works:
mysql --max_allowed_packet=512M -u root < .\db\dropUser.sql
But, when I browse pages with Drupal, my limit is back to 1Mb, despite the fact that my my.ini file has the value 512 in it.
...
It is possible in magento to add a VAT nr to your account but in belgium it's more common to add a VAT nr to your billing address.. is this possible in some kind of way ?
...
Hi all,
I have encountered a problem where I need to copy only data from a Postgresql database to Mysql database. I already have the Mysql database with empty tables. By using PGAdmin I got a backup (data only, without database schema). I tried using PSQL tool but it keeps giving segmentation fault which I couldn't fix at the moment. ...
I currently have an application that is using 130 MySQL table all with MyISAM storage engine. Every table has multiple queries every second including select/insert/update/delete queries so the data and the indexes are constantly changing.
The problem I am facing is that the hard drive is unable to cope, with waiting times up to 6+ secon...
Hi Friends. I am new to PHP and Javascript.
I am uploading files that after 15 days need to be deleted automatically from the database. Please can anyone help me out.
I am using following code for uploading:
<?php
$nid = 1;
$teaser = false;
// Load node
$node = node_load(array('nid' => $nid));
// Prepare its output
if (node_hook($n...
hi foks,
i am facing issue while creating table where in that one column which is set to default value of current date........i would stress this point "that i need only date not time along with that"....i would be really thankfull to those who tries to help me....
...
I need to use a variable to indicate what database to query in the declaration of a cursor. Here is a short snippet of the code :
CREATE PROCEDURE `update_cdrs_lnp_data`(IN dbName VARCHAR(25), OUT returnCode SMALLINT)
cdr_records:BEGIN
DECLARE cdr_record_cursor CURSOR FOR
SELECT cdrs_id, called, calling FROM dbName.cdrs WHERE lrn_...
I have m:n relationship between users and tags. One user can have m tags, and one tag can belong to n users. Tables look something like this:
USER:
ID
USER_NAME
USER_HAS_TAG:
USER_ID
TAG_ID
TAG:
ID
TAG_NAME
Let's say that I need to select all users, who have tags "apple", "orange" AND "banana". What would be the most effective way t...
I am trying to run simple perl dbi example script to connect to mysql database and do some inserts.
Code:
#! bin/usr/perl -w
use strict;
use warnings;
use DBI();
my $dbh = DBI->connect(
"DBI:mysql:database=SPM;host=IP Address", "username", "password",
{'RaiseError'=>1}
);
my $dbh->do(
'INSERT INTO payment_methods(name, ...