ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 16th, 2003, 09:55 AM
hounddog_bob hounddog_bob is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Calgary, Alberta
Posts: 4 hounddog_bob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Can anyone help with this combox issue?

Can any help with this?

I have a Combo Box populated by 2 fields from a MS Access DB. The values are seperated by a comma and a space. When the user selects the option I want the values to be seperated and written to a different table in the data base. How do I seperate the values. The fields are "Venue" and "City"

The code that populates the combobox looks like this

do while not objrsVenues.EOF
Response.Write "<OPTION>"
Response.Write objrsVenues("Venue")
Response.Write (",&nbsp;&nbsp;")
Response.Write objrsVenues("City")

objrsVenues.MoveNext
loop

end if
objrsVenues.close

The Code I have been trying to write this to the DB looks like this

objrsShow_Info.AddNew 'populate new record


objrsShow_Info("Start_Date") = Request.Form("Start_Date")
objrsShow_Info("End_Date") = Request.Form("End_Date")
objrsShow_Info("Venue") = left (Request.Form("Venue"),1)
'I think I am on the right track with this, but obviously I am only getting the first character. I need to get everything up to the first comma.

objrsShow_Info("City") = Request.Form("Venue") 'here I need to get everything after the first comma and space.


objrsShow_Info.Update
objrsShow_Info.Close

Any help would be appreciated

Reply With Quote
  #2  
Old September 16th, 2003, 12:40 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 13 m 21 sec
Reputation Power: 76
Well, you could split() on the comma, but I wonder why you don't just write directly from one table into the other using 2 recordsets, or make 2 fields for the 2 entries, to make things easier.
Or, declare variables to contain the data from the first recordset, and use the variables to display later. Then you only need one recordset at a time, and can still display the combo box in the same way, you'll just use the variables in your second recordset
__________________
--Dave--

U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM=

Last edited by karsh44 : September 16th, 2003 at 12:43 PM.

Reply With Quote
  #3  
Old September 16th, 2003, 02:48 PM
hounddog_bob hounddog_bob is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Calgary, Alberta
Posts: 4 hounddog_bob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the reply Dave.

I have sent you a personal message.

Cheers,
James

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Can anyone help with this combox issue?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT