Click here to Skip to main content
16,006,006 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Apache Server Information Pin
JimmyRopes12-Jul-07 12:02
professionalJimmyRopes12-Jul-07 12:02 
AnswerRe: Apache Server Information Pin
leckey12-Jul-07 11:02
leckey12-Jul-07 11:02 
GeneralRe: Apache Server Information Pin
JimmyRopes12-Jul-07 11:14
professionalJimmyRopes12-Jul-07 11:14 
GeneralRe: Apache Server Information [modified] Pin
leckey12-Jul-07 11:45
leckey12-Jul-07 11:45 
GeneralRe: Apache Server Information Pin
JimmyRopes12-Jul-07 12:05
professionalJimmyRopes12-Jul-07 12:05 
GeneralRe: Apache Server Information Pin
JimmyRopes12-Jul-07 16:44
professionalJimmyRopes12-Jul-07 16:44 
GeneralRe: Apache Server Information Pin
leckey12-Jul-07 17:10
leckey12-Jul-07 17:10 
QuestionDatabase connection problem Pin
matjame12-Jul-07 2:42
matjame12-Jul-07 2:42 
Howzit guys.

I have this code with a connection to the database.The code is suppose to create and dropdownlist and automatically populate it with values from the database, then display everything on the page.(The dropdown with values)

Problem is, when I run I only get this "Dynamic dropdown lists using Active Server Pages and Microsoft Access

Below is an example of a drop down list, dynamically populated from
a database table."

Then the values are not shown.Is there a setting on my Macromedia that I need to enable to allow database values or Im missing something.

here is the code:
Please guys, I have till this next week monday to get this rite

<%@LANGUAGE="VBSCRIPT" %>



<%
Option Explicit
Dim objConn
Dim objRS
Dim objRS2
Dim strSQL

Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS2 = Server.CreateObject("ADODB.Recordset")

objConn.ConnectionString = Server.MapPath("dropdowns.mdb")
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
objConn.Open


'-- Sub Procedure that builds the dropdown list.
'-- Parameters c, r and table are passed when the sub is built.
Sub showDropDownList(c, r, table)

'-- SQL Statement
strSQL = "SELECT * FROM " & tblDropDownTest & " ORDER BY Title ASC"
'-- Execute our SQL statement and store the recordset
Set r = c.Execute(strSQL)

'-- START MAIN CODE BLOCK
'-- If we have records to return
if not r.eof = false then
'-- Open a form/select tag
'-- This particular example has no action attribute, which would normally...
'-- ...be required in order to post the data to another page for processing.
Response.Write "

"
Response.Write "" & vbCrLf
Response.Write "Choose...."

'-- loop and build each database entry as a selectable option
While r.EOF = false
Response.Write ""
_ & r.Fields("Title").Value & "" & vbCrLf

'-- Move recordset to the next value
r.movenext
Wend
end if
'--END OF MAIN CODE BLOCK

'-- close select/form tags
Response. Write "" & vbCrLf

End Sub

%>




<title>




Dynamic dropdown lists using Active Server Pages and Microsoft Access


Below is an example of a drop down list, dynamically populated from
a database table.




<%
' -- Call the sub procedure to build the drop down list, with the connection
and recordset objects and the source table (In quotes).
call showDropDownList(objConn, objRS, "tblDropDownTest")
%>



 


 




 






kagiso

AnswerRe: Database connection problem Pin
Vasudevan Deepak Kumar12-Jul-07 23:57
Vasudevan Deepak Kumar12-Jul-07 23:57 
QuestionLoad a .net library Pin
pranu_1311-Jul-07 21:33
pranu_1311-Jul-07 21:33 
AnswerRe: Load a .net library Pin
Michael Sync11-Jul-07 23:15
Michael Sync11-Jul-07 23:15 
GeneralRe: Load a .net library Pin
pranu_1312-Jul-07 0:26
pranu_1312-Jul-07 0:26 
GeneralRe: Load a .net library Pin
Christian Graus12-Jul-07 10:07
protectorChristian Graus12-Jul-07 10:07 
QuestionReceiving posted file Pin
Brent Lamborn11-Jul-07 6:21
Brent Lamborn11-Jul-07 6:21 
AnswerRe: Receiving posted file Pin
Brent Lamborn11-Jul-07 8:16
Brent Lamborn11-Jul-07 8:16 
QuestionGet HTML Element properties in VBScript [modified - again] [modified] Pin
#realJSOP11-Jul-07 6:04
professional#realJSOP11-Jul-07 6:04 
Generalforum codes Pin
VonHagNDaz11-Jul-07 5:04
VonHagNDaz11-Jul-07 5:04 
GeneralRe: forum codes Pin
#realJSOP11-Jul-07 8:10
professional#realJSOP11-Jul-07 8:10 
GeneralRe: forum codes Pin
Rob Graham11-Jul-07 8:44
Rob Graham11-Jul-07 8:44 
GeneralRe: forum codes Pin
VonHagNDaz11-Jul-07 8:50
VonHagNDaz11-Jul-07 8:50 
GeneralRe: forum codes Pin
Christian Graus11-Jul-07 15:02
protectorChristian Graus11-Jul-07 15:02 
Questionsimple way Pin
kvijayajyothy11-Jul-07 0:11
kvijayajyothy11-Jul-07 0:11 
AnswerRe: simple way Pin
Sathesh Sakthivel11-Jul-07 0:15
Sathesh Sakthivel11-Jul-07 0:15 
AnswerRe: simple way Pin
Vasudevan Deepak Kumar11-Jul-07 3:22
Vasudevan Deepak Kumar11-Jul-07 3:22 
Questionasp development Pin
chandu_shar10-Jul-07 23:06
chandu_shar10-Jul-07 23:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.