Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-07-2005, 10:09 AM   #1 (permalink)
goalstopper
Registered User
 
Join Date: Jul 2005
Posts: 1
goalstopper is on a distinguished road
VB and MySQL

I am very much a newbie. I need some help getting results. I want to run a count query against a MySQL table using VB.net. The query is very simple 'SELECT COUNT(*) FROM tempdata WHERE cto = '7488'.

If I run this on the server is get a return value of 4. What I can't figure out is how to get that returned value in VB.NET. I can open the connection. I just cant figure out how to get that returned value from the count. It cant be that difficult. Can anyone help?

Thanks
goalstopper is offline   Reply With Quote
Old 07-07-2005, 11:03 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,709
redhead is on a distinguished road
have you checked the VB.net-MySQL tutorial ?
Look about 3/5 down into it, where it states Retrieving the User ID With A Parameterized Query, it should give you an idear.. especialy the line:
UserID = myCommand.ExecuteScalar
kinda gives me the idear that in this example the UserID will be holding the fetched result from the query.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-12-2005, 11:20 AM   #3 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
the .NET framework is not equipped with a provider for for MySQL, you will need to download one.

Google returns numerous amounts of results for providers:
http://www.google.com/search?hl=en&l...+data+provider
__________________
~Ryan

rdove is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:38 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting