Please help, how do I really use data reader in vb.net. I'm using odbc to connect mysql and vb.net.
Function I declared on a module:
Public Function form2search(ByVal drugname As String) As OdbcDataReader
cmd.CommandText = "SELECT * FROM drug WHERE Drug_name LIKE'%" & drugname & "' "
Return cmd.ExecuteReader
End F...
I have a table that is similar to:
cycle | id | name
------|-------|------
0 | 0012 | bob
s | 0012 | bob
1 | 0012 | bob
0 | 6208 | sally
1 | 6208 | sally
0 | 3276 | jane
s | 3276 | jane
1 | 3276 | jane
0 | 8736 | harry
s | 8736 | harry
I need a query that will result in:
cycle | id...
hi, in MySQL 5.1, i named a field 'Starting'. However, eachtime i would used an SQL query, it would say invalid SQL syntax. After some google search, i found out that STARTING is a reserved SQL word, but Undocumented. Can anyone tell me what it is? thanks.
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
...
Hi,
I haven't disabled autocommit in my connection. But even then, if there are any issues in the execution, the rollback is working fine.
Since the autocommit is enabled, shouldn't the statements be auto committed preventing the rollback from happening?
Thanks
...
Hi,
I keep getting an error while trying to do so - "Keyword not supported. Parameter name: autocommit". Not sure what's wrong here. Can you guys let me know the correct syntax. Thanks!
...
I Understand Character sets but I don't understand Collation. I know you get a default collation with every Character set in Mysql or any RDBMS but I still don't get it! Can someone please explain in layman terms?
Thank you in advance ;-)
...
I'm fetching data from a text file or log periodically and it gets inserted in the database every time fetched. Is there a way in MySQL that the insert is only done when the log files are updated or I have to do it using the programming language ? I mean Is there a type of insert that when It sees a duplicate primary key, It doesn't give...
Hey,
I have a database that shows me different stats about different campaigns, each row has a timestemp value name "date".
I wrote the code for choosing and summerizing a range of dates, for example: 21-24/07/2010.
Now I need to add an option to choose a range of dates, but also to group the stats for each X days.
Let's say the user...
I want to display most active users by the amount of comments they have left on my site. I can't figure out what would the mysql query look like for this. There is no table that holds the total amount of comments for each user. I need to count the total amount of comments for each user somehow and display for example top 10 users with mo...
Hi, please could someone help me with this. I can't seems to get my mind around the SQL statement I need to get what I want. Below is my table.
| product_id | product_name | product_thumb_image |
------------------------------------------------------
| 1 | ProductA | images/img_A.jpg |
| 2 | ProductB ...
Hello guys I'm stucked at this point. So I need your help, thanks anyway.
I'm using this code to count rows and trying to do IF num rows equals to ZERO do INSERT if not UPDATE but doesnt works. When I use "==" operator nothing happens, if I use ">=" operator script inserting the values but running insert query on every refresh and value...
Hi,
I would like to know the general practice used in the industry for generating sequence numbers.
i.e. Get the max from a table. Increment it and store it back.
In order for this to work, which isolation level and/or locking scheme should be used.
I thought serializable should work fine. But it only prevents updates to a table. Sel...
I was wondering which type of query is better to use:
SELECT * FROM table WHERE DATE >= '2010-7-20' AND DATE <= '2010-7-24'
OR
SELECT * FROM table WHERE DATE_SUB('2010-07-24',INTERVAL 4 DAY) <= DATE
...
Hello,
I have a MySQL high scores table for a game that shows the daily high score for each of the past days of the year. Right now I am doing a PHP for-loop and making a separate query for each day, but the table is becoming too large to do that so I would like to condense it into one simple MySQL statement.
Here is my new query right...
I was wondering if there is a good tutorial or tutorials on how to build good RSS 2.0 and ATOM feeds?
...
hi there,
I am not sure I am correct in this.
I have insert 5 rows with values with id as primary key and autoincrement.
Then I delete row number 2-4.
when I insert on a new line with none id, the new id becomes "6". Is this normal?
How is it possible if you want the mysql to insert in the deleted row? what are the settings?
...
hi,
if you have millions of entries in a mysql table, you often want to manipulate it with a hexadecimal primary key (in practice you do a md5(name)). The queries are then much faster.
Is there a way to do this with Django?
If not, the usual int primary key isn't limitating?
How to specify that you want a big integer?
...
I want to display multiple images and when rollover above it i must get a tooltips (names). The same names are in the database mySQL. Naturally, to tooltips displayed without delay, preferably immediately put all the names from the database into an array and then manipulate them. Tell me please what I do wrong?
Php class to connect dat...
I made a while loop in php:
<?php
include_once("connect.php");
$search=mysql_query("SELECT * from chat ORDER BY id DESC LIMIT 1");
$row=mysql_fetch_assoc($search);
$type=$row['type'];
$id=$row['id'];
while($type!='n'){
usleep(10000);
$search=mysql_query("SELECT * from chat ORDER BY id DESC LIMIT 1");
$row=mysql_fetch_assoc($searc...
I'm stuck on my matchmaker site. It's like eHarmony for married couples to find other couples to socialize with.
I'm trying to be a good rdba and am using a million tables then using a number of complicated joins to pull the info out I want. But, I'm stuck on one of the last ones. I can do it in the code, but I should be able to do it i...