473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inserting to DB Question

I have DropDown List ...
that populates some Data..But the DropDown does a postback that
retrieves some other DropDown List with Data
But i want to add Data to the Dropdpwn list they have selected..
The table i want to add to looks like this:-

D_ID|AddID|AdddTypeID|Address
1 |1 |1 |Site 304 NICHOLSON ST FITZROY VIC3065
1 |2 |2 |Delivery 304 NICHOLSON ST FITZROY VIC 3065

I want to the user to Add a new Address with the right D_ID,ADDID and
AddTypeID..

AddID is incremented others won't

Any ideas?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
3 977
Maybe it's me, but I read your question three times and Im still not
entirely sure what you are after. So lets see what I can gest out of your
text.

1.) Running ASP.NET Webform with a DropDownList
2.) DDL is configured to do AutoPostback ?
3.) DDL comes back with different data after the postback ?
4.) You didnt want 3.) to happen, but wanted to add new data ?

Q1.) Did I understand 1-4 correctly above ?
Q2.) Are you using the text property of the DDL to add the new table record
?

Asuming Q1 and Q2 are correct, to add a new row to a table is easy
Dim t As New DataTable
Dim c As New DataColumn("LinkURL")
Dim r As DataRow = t.NewRow()

t.Columns.Add(c)
r(0) = "http://TrainingOn.net"
t.Rows.Add(r)

If I've misunderstood you, please clarify.

--
Terry Burns
http://TrainingOn.net
"Patrick Olurotimi Ige" <na********@hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP14.phx.gbl...
I have DropDown List ...
that populates some Data..But the DropDown does a postback that
retrieves some other DropDown List with Data
But i want to add Data to the Dropdpwn list they have selected..
The table i want to add to looks like this:-

D_ID|AddID|AdddTypeID|Address
1 |1 |1 |Site 304 NICHOLSON ST FITZROY VIC3065
1 |2 |2 |Delivery 304 NICHOLSON ST FITZROY VIC 3065

I want to the user to Add a new Address with the right D_ID,ADDID and
AddTypeID..

AddID is incremented others won't

Any ideas?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
Terry sorry i was rushing when i wrote the question..
You understood my Question but not everything..
The first thing that appears on the screen is one DropDown List and
after postback 3 other DropDownList appears..
Now the User will be able to selct in the DropDown so now depending on
what they have selected in any of the other 3 DropdownList.I want them
to be able to Add Data to the table the the DropDown list is populated
from..
For example if the DropDwonList they selected is "B" and the value is
"2" when they click (Add) beside the DropDownList i want to retrieve
that value they have selected and add it to the table
Hope that helps

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
Thanks Terry for the reply..
Got it working..

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Greg Ofiesh | last post by:
Anyone who can help, I have two tables T1 and T2. T1 has fields K1 and F2 and T2 has fields K2 and F1. F1 is the foreign key relating to K1 and F2 is the foreign key relating to K2. My...
3
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when...
4
by: Bruno Alexandre | last post by:
Hi guys, I have a web application that insert Clients info into the Database, the Apllication is accesed by several user at the same time, the Client Info is divide by 3 tables (Client, Product...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
8
by: LimaCharlie | last post by:
Hi, Question pls. I have an MS SQL local package where it exports data from SQL table to Excel file. My question is, how can I erase all the records in my excel file before i export the new data...
11
by: krishnakant Mane | last post by:
hello, I finally got some code to push a pickled list into a database table. but now the problem is technically complex although possible to solve. the problem is that I can nicely pickle and...
2
by: Ravigandha | last post by:
Hello everybody, My question is how to insert special characters and symbols in Mysql5 database and how to retrieve them from database in php. Here i am inserting some data from a form,by post...
1
by: Emma Middlebrook | last post by:
Hi, I've implemented an AJAX update panel on one of my ASP.NET web pages. I generate and add controls to it dynamically. What I would like to do is tell it to start a new line before adding the...
5
by: dos360 | last post by:
Hello, I have two tables, one is a list of activities, the other a list of participants. I want to insert one record in the activities table and then using its identity column as foreign key, I...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.