| | |
Help with MySQL
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamically edit fileuploader fill flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice youareanotmemberofthedebuggerusers





