Who here knows ASP.NET?

Juniper

Platinum Member
Nov 7, 2001
2,025
1
0
Hi people.

Ok, Im trying to make asp.net work with mySQL. From information gathered from here and there, I've understood that I have to install the ODBC pack provided by Microsoft.

However, I cannot seem to be able to import the namespace System.Data.Odbc

Here is how I wrote the line which refers to the Odbc:

<%@ Import Namespace="System.Data.Odbc" %>

And here is the compilation error:

Compiler Error Message: CS0234: The type or namespace name 'Odbc' does not exist in the class or namespace 'System.Data' (are you missing an assembly reference?)
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
Nope.

You wanna use OleDb.

<%@ Import Namespace="System.Data.OleDb" %>

Then, make sure that you got the right drivers for MySQL. After that, follow the QuickStart tutorials (or from a book) to open an OleDbConnection, etc.
 

Juniper

Platinum Member
Nov 7, 2001
2,025
1
0
Nope.

You wanna use OleDb.

<%@ Import Namespace="System.Data.OleDb" %>

Then, make sure that you got the right drivers for MySQL. After that, follow the QuickStart tutorials (or from a book) to open an OleDbConnection, etc.



joohang, hey thanks for the tip. I don't know why, but I've been obstinately trying to make mySQL work with ASP.NET using the System.Data.Odbc. Never occurred to me that I could use OleDb. :eek:

Thx man.


NeoMadHatter, you're so lucky ;) Enjoy the course.

 

mithrandir2001

Diamond Member
May 1, 2001
6,545
1
0
Ewwww, ODBC.


<< but why dont you use php? >>


Spit, blak, yuck. You may have a small point with PHP vs ASP, but ASP.NET blows everything out of the water. For some tasks, development time is cut by two-thirds or more...and it's fast! PHP will soon be relegated as a special-interest platform...like Linux.
 

StageLeft

No Lifer
Sep 29, 2000
70,150
5
0
Yeah olddb is what you want for most things/everything vs odbc.

PhP is for penguin-f**kers! Linus fanboys! :D
 

joohang

Lifer
Oct 22, 2000
12,340
1
0


<< joohang, hey thanks for the tip. I don't know why, but I've been obstinately trying to make mySQL work with ASP.NET using the System.Data.Odbc. Never occurred to me that I could use OleDb. :eek: >>


Yeah. When you get an error message asking "Are you missing an assembly reference?" it likely means that you're not using the correct class library.

Also, get used to the MSDN Library (.NET Class Libraries Reference). ;)



<< Thx man. >>


No problem. :D
 

joohang

Lifer
Oct 22, 2000
12,340
1
0


<< ASP is for windows suckers! M$ fanboys! >>


ASP != ASP.NET

Seriously. They are very different beasts.

ASP.NET 0wnz j00 4ll. :)
 

NeoMadHatter

Platinum Member
Nov 29, 2000
2,355
0
0
johntwang.com


<< Nope.

You wanna use OleDb.

<%@ Import Namespace="System.Data.OleDb" %>

Then, make sure that you got the right drivers for MySQL. After that, follow the QuickStart tutorials (or from a book) to open an OleDbConnection, etc.



joohang, hey thanks for the tip. I don't know why, but I've been obstinately trying to make mySQL work with ASP.NET using the System.Data.Odbc. Never occurred to me that I could use OleDb. :eek:

Thx man.


NeoMadHatter, you're so lucky ;) Enjoy the course.
>>



thanks. i just got back from it. it was very interesting. learned a bit about what asp is and what asp.net is and some IIS stuff too. all very interesting. the highlight was probably free pizza and got out with a free full copy of windows xp professional and windows plus! for xp. going to the visual studio.net presentation tomorrow and getting another copy of windows xp pro. should be fun.
 

Juniper

Platinum Member
Nov 7, 2001
2,025
1
0
Yeah. When you get an error message asking "Are you missing an assembly reference?" it likely means that you're not using the correct class library.

Also, get used to the MSDN Library (.NET Class Libraries Reference).



:)