473,569 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting a control linked to a database record - beginners question

JJ
OK - I asked this earlier but thought I'd solved it. Clearly not.

I have a control that I need to display text from an sql database. The
control is being used as a web part so can be placed on a page more than
once.

I am trying to work out how I'd get each instance of the control to load its
corresponding database record to display the text?

I would normally do this sort of thing via a querystring, but in this case
its not going to be practical.

Could someone give me some hints on how I could get the control to know
which database record it needs without using querystrings?

What I think I need is a unique property value (unique on all pages) for
each control, that I can store in the database record.....??

Help!!

JJ
Apr 12 '07 #1
2 1119
JJ
Perhaps if I could make each control id unique throughout the entire site, I
could use that to look up a specific row ?
"JJ" <ab*@xyz.comwro te in message
news:e2******** ******@TK2MSFTN GP06.phx.gbl...
OK - I asked this earlier but thought I'd solved it. Clearly not.

I have a control that I need to display text from an sql database. The
control is being used as a web part so can be placed on a page more than
once.

I am trying to work out how I'd get each instance of the control to load
its corresponding database record to display the text?

I would normally do this sort of thing via a querystring, but in this case
its not going to be practical.

Could someone give me some hints on how I could get the control to know
which database record it needs without using querystrings?

What I think I need is a unique property value (unique on all pages) for
each control, that I can store in the database record.....??

Help!!

JJ

Apr 12 '07 #2
JJ
I guess the url combined with the control id would be a unique value. My
concern then is if I allow a user to move the control (web part) to another
part of the page, I assume the control id would change. I'd therefore have
to work some way out of updating this in the record.

Anyone have any suggestions?

"JJ" <ab*@xyz.comwro te in message
news:uy******** ******@TK2MSFTN GP02.phx.gbl...
Perhaps if I could make each control id unique throughout the entire site,
I could use that to look up a specific row ?
"JJ" <ab*@xyz.comwro te in message
news:e2******** ******@TK2MSFTN GP06.phx.gbl...
>OK - I asked this earlier but thought I'd solved it. Clearly not.

I have a control that I need to display text from an sql database. The
control is being used as a web part so can be placed on a page more than
once.

I am trying to work out how I'd get each instance of the control to load
its corresponding database record to display the text?

I would normally do this sort of thing via a querystring, but in this
case its not going to be practical.

Could someone give me some hints on how I could get the control to know
which database record it needs without using querystrings?

What I think I need is a unique property value (unique on all pages) for
each control, that I can store in the database record.....??

Help!!

JJ


Apr 13 '07 #3

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

Similar topics

6
3394
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get sized strangely using the .RTFHeight property of the control. Specifically, lines of text get cut off the bottom of the control when I use the code...
1
4307
by: Julia | last post by:
Hello there. I have a question somewhat related to this topic, and I don't know where else to go. I hope somebody can help. I've created a database in access, that I'd like to share with less than 10 users. I'd like each user to see only some of the records in the database. So for example, if I have eight users in eight countries, I...
2
4959
by: dBNovice | last post by:
Hello All, I could really use some serious help with this one... I have a form that has a tab control with 3 pages. Page(0) is Tasks, Page(1) is SubTasks, and Page(2) is Elements. Page (1) is a subform of page (0); linked with TaskID and page (2) is a subform of page (1); linked with SubtaskID. I want to be able to have multiple subtasks...
10
7681
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on close' I think that I have read in some threads (althoug I cannot find them now) that others place such tables in a local, linked database. I could...
3
1860
by: dickylau | last post by:
I got a question about the singly linked list for (1) inserting the new record before the users type the number of the position & (2) removing the name of the record which users type the name. bool Database::remove(char *recName) { Record *pCurr, *pPrev, *rec; pCurr = pFirst; int i = 0; do { pPrev = pCurr;
1
1602
by: sparks | last post by:
I have a form/table with an autoid it is linked to a table/form with and ID as a 1 to many. Under this form/table I need another table with many records for each on of the many in the previous table. form1 form2 form3 table1 table2 table3 autoid...
2
1112
by: JJ | last post by:
I have a control that can be placed on any page 1 or more times (like a web part). The control loads text from database tables. Its the first time I've done this so I just need a pointer to solve a very simple problem: How do I tell the control which record to get the text from in the database? e.g.. I could use a querystring - but that...
1
1222
Stang02GT
by: Stang02GT | last post by:
This is a little difficult to explain so bear with me, and if anyone has any questions i will be happy to clarify for you I have a database linked into my access database. This linked database is full of "projects" for the whole company. I am pulling only the "projects" that apply to my division. this linked database is read only and i have...
7
2883
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt enough memory' error whenever I scroll past N number of bytes in a textbox that has been filled with a lot of data. I am not sure what N is, but for...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.