Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Listing Data from mdb. in a listbox

New Here ,
Jan 09, 2009 Jan 09, 2009

Copy link to clipboard

Copied

Hello guys thx for help

I have a huge database with about 3000 datas. This database holds 8 different tables with 4 5 different colomns. I tried to build a web interface for my collegues to enter their datas by using this interface. I face a problem.

What I want to do for ex. is make a list of Company Names in a text box by calling them from my mdb. I tried to use the code in the attachment, that code but by that I could only list one agent name to the page. How can show the whole agent names in a box and make them choose one from the list for the new entry
TOPICS
Server side applications

Views

360
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 09, 2009 Jan 09, 2009

Copy link to clipboard

Copied

obekdik wrote:
> Hello guys thx for help
>
> I have a huge database with about 3000 datas. This database holds 8 different
> tables with 4 5 different colomns. I tried to build a web interface for my
> collegues to enter their datas by using this interface. I face a problem.
>
> What I want to do for ex. is make a list of Company Names in a text box by
> calling them from my mdb. I tried to use the code in the attachment, that code
> but by that I could only list one agent name to the page. How can show the
> whole agent names in a box and make them choose one from the list for the new
> entry
>
> <select name="AgentName" size="1" id="AgentName">
> <option value="">Agent...</option>
> <option value="<%=rs1("AgentName")%>"><%=rs1("AgentName")%></option></select>
>

You need to loop through your recordset.

Its easy to do using the built in behaviours in Dreamweaver CS3.

1. Create your recordset
2. Insert list/menu from the Form panel
3. Select your list on the page, then from the properties panel click on
Dynamic
4. Select your recordset, label and value.
5. Job done, grab yourself a coffee and marvel at the power of Dreamweaver.

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2009 Jan 09, 2009

Copy link to clipboard

Copied

This is the same thing I did before I wrote the code it didn't make what I want. By this ıt only shows I data ı want to see all the data

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 09, 2009 Jan 09, 2009

Copy link to clipboard

Copied

obekdik wrote:
> This is the same thing I did before I wrote the code it didn't make what I want. By this ?t only shows I data ? want to see all the data

Sounds like your doing something wrong, or I am misunderstanding your
problem.

The code you showed doesn't include the loop, so something didn't work.

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2009 Jan 09, 2009

Copy link to clipboard

Copied

How can I enter the loop my friend actually I dont know how to do it

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2009 Jan 12, 2009

Copy link to clipboard

Copied

obekdik wrote:
> How can I enter the loop my friend actually I dont know how to do it

If you had done what I previously suggested it should have worked, and
the select would now look something like this:

<select name="customer" id="customer" onchange="this.form.submit()">
<option value="" <%If (Not isNull(Customer)) Then If ("" =
CStr(Customer)) Then Response.Write("selected=""selected""") :
Response.Write("")%>>All</option>
<%
While (NOT rsCustomers.EOF)
%><option value="<%=(rsCustomers.Fields.Item("Customer").Value)%>" <%If
(Not isNull(Customer)) Then If
(CStr(rsCustomers.Fields.Item("Customer").Value) = CStr(Customer)) Then
Response.Write("selected=""selected""") : Response.Write("")%>
><%=(rsCustomers.Fields.Item("Name").Value)%></option>
<%
rsCustomers.MoveNext()
Wend
If (rsCustomers.CursorType > 0) Then
rsCustomers.MoveFirst
Else
rsCustomers.Requery
End If
%>
</select>

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2009 Jan 12, 2009

Copy link to clipboard

Copied

LATEST
Dooza wrote:
> obekdik wrote:
>> How can I enter the loop my friend actually I dont know how to do it
>
> If you had done what I previously suggested it should have worked, and
> the select would now look something like this:
>
> <select name="customer" id="customer" onchange="this.form.submit()">
> <option value="" <%If (Not isNull(Customer)) Then If ("" =
> CStr(Customer)) Then Response.Write("selected=""selected""") :
> Response.Write("")%>>All</option>
> <%
> While (NOT rsCustomers.EOF)
> %><option value="<%=(rsCustomers.Fields.Item("Customer").Value)%>" <%If
> (Not isNull(Customer)) Then If
> (CStr(rsCustomers.Fields.Item("Customer").Value) = CStr(Customer)) Then
> Response.Write("selected=""selected""") : Response.Write("")%>
> ><%=(rsCustomers.Fields.Item("Name").Value)%></option>
> <%
> rsCustomers.MoveNext()
> Wend
> If (rsCustomers.CursorType > 0) Then
> rsCustomers.MoveFirst
> Else
> rsCustomers.Requery
> End If
> %>
> </select>
>
> Dooza

I should have said, this is example code from one of my projects, its
not meant to be a solution to yours, just an example of what the code
might look like.

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines