View Single Post
Old 06-22-2005, 10:31 AM   #1 (permalink)
brendalisalowe
Registered User
 
Join Date: May 2005
Posts: 9
brendalisalowe is on a distinguished road
Why won't fill combobox?

Hello. I am trying to do this but I am new at this. I am using Dreamweaver and I know that is not the best for Dynamic stuff...I've heard. I'm more use to VS.NET. Anyway, just wondering why this is not filling my combobox? I'm newer to Access too. I usually use SQL Server. Anyway, I just need a little help on getting started. Thanks for your time!

Code:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="VB" runat="server">
sub Page_Load(sender as Object, e as EventArgs)
    Dim connString as String
    connString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & _			"C:\Inetpub\wwwroot\2006DB.mdb;"
    
    Dim strSQL as String = "SELECT GrpingCode FROM tbl_CourseMainInfo"
    Dim da as New SqlDataAdapter(strSQL,connString)
	Dim ds as New DataSet()
    da.Fill(ds,"tbl_OTOLupCourseGroups")
	Dim row as Datarow	
	row = ds.Tables("tbl_CourseMainInfo").Rows()	
	For Each row in ds.Tables("tbl_CourseMainInfo")
		cmbSelect.Items.Add(row("GrpingCode"))
	Next
  end sub
</script>
<html>
..............
</html>
brendalisalowe is offline   Reply With Quote