| | |
Help with MySQL
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2007
Posts: 14
Reputation:
Solved Threads: 0
I am trying to connect to a mysql database. ideally, i'd like it dumped into a grid view so i can edit it... no matter how i try it, i get this error-
Compiler Error Message: BC30002: Type 'ODBCConnection' is not defined.
here is the code for this page:
ASP.NET Syntax (Toggle Plain Text)
<%@ page language="VB" Debug=true %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="Microsoft.Data.Odbc" %> <HTML> <HEAD> <SCRIPT Language="VBScript" Runat="server"> Sub Page_Load(Source as object, e as EventArgs) Dim sConnection = "DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=localhost;" _ & "DATABASE=db;" _ & "UID=BrowserName;" _ & "PWD=bfakepass;" _ & "OPTION=3" '& 1 + 2 + 8 + 32 + 2048 + 16384 Dim oConnection as ODBCConnection = new ODBCConnection(sConnection) Dim sSQL as String = "SELECT FirstName, LastName FROM addresses" Dim oDataAdapter as ODBCDataAdapter = New ODBCDataAdapter(sSQL, oConnection) Dim oDataSet as DataSet = new DataSet() oDataAdapter.Fill(oDataSet) oDataGrid.DataSource = oDataSet oDataGrid.DataBind() End Sub </SCRIPT > </HEAD> <BODY> <ASP:DataGrid ID="oDataGrid" Runat="server" /> </BODY> </HTML>
![]() |
Similar Threads
- jsp and mysql (JSP)
- SQL Server vs MYSQL vs MSQL (i'm stopping now) (MS SQL)
- MySQL for this forum ... (MySQL)
- MySQL vs. PostgreSQL (MySQL)
- MySQL-Front - Graphical Interface for MySQL (MySQL)
Other Threads in the ASP.NET Forum
- Previous Thread: Run msn messenger on button click in asp.net 2.0
- Next Thread: Server Error in '/' Application
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers





