Multiple Data Items In Single Field?

Apr 30, 2009

What I'm trying to do - VB 2005 express and sql 2005 express editions - Trying to set up just a basic hardware/software inventory program. As is I've got separate tables for computer and software licenses...with ComputerID and LicenseID primary keys respectively...where I'm bumping into walls is that I wanted to be able to link them together with a foreign key, for example the computer record would have a foreign key for LicenseID and when a license would get installed the ID would go in and there'd be a nice pretty link. However I run into scenarios where a computer might not have any software installed...or might have more than 1 software item. Or a single software item may be installed on 1 computer, multiple computers, or nowhere. It possible to have that single foreign key field link to multiple records from the opposite table?

What was originally suggested to me was to have a 3rd table called Installations. It'd have 3 rows...one named InstallationID as the primary key, and 2 foreign key rows named ComputerID and LicenseID that linked to the other tables, so that when a license was installed, a record would be added to the Installations table, and later on when we wanted to see where all a particular license was installed or what licenses a single computer had, the table could be filtered by computer ID or license ID and all matching records could be displayed. When I tried that out though I'm having a heck of a time getting the correct items to display.

Just as a basic test i set up a new form and dragged the tables onto it from the Data Sources window using "Details" view for each of them, so that it set up the table adapters and binding sources and navigator for me. I got rid of the auto-added labels + textboxes on the form and added just a couple new textboxes, 1 linked to the licenseID and one to another row i had in that table for productkey...tested it and it moves through the records fine and the correct data shows up in each box to correspond with the other. now though I'd like to add another control to display each of the ComputerIDs that are linked to the particular license being displayed in the other controls via the foreign keys routing through the Installations table, but I'm not having much luck.

View 1 Replies


ADVERTISEMENT

Store Multiple Selected Values In Single Field From Listbox In Program?

Jul 6, 2010

This is my code which i used to try this but it inserts only the last value in the listbox but i need all the selected values seperated by comma [code]...

View 2 Replies

Data Bound To ListBox - Display Two Data Items As A Single Item?

May 7, 2012

I have an Address Book project with a listbox. The listbox is bound to the database via the little arrow pop-up box in the corner of the listbox. I have the DisplayMember set to FirstName, and obviously only display the First Name of the contact in the ListBox. Is there an easy way to change it so that it displays the First and Last names? I can't change the binding because I need it to get the ID of the record selected.Here's the basis of my code...

Private Sub MainForm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'CompanyDataSet.Contacts' table. You can move,

[code].....

View 1 Replies

Variables - Combining Multiple Data Types Into A Single Unified Data Structure

Mar 16, 2012

In VB.NET I would like to create a complicated data structure with multiple types of data stored in an array like format (see below). I am trying to create a data structure that would look something like this: [Name; xLoc; yLoc; zLoc; [Jagged Array]] Note: Name needs to be dimensioned as a string, xLoc and so forth as integers. The Jagged Array would look like this:

[Code]...

View 1 Replies

Multiple Data Source For A Single Report?

Jun 9, 2011

is it possible to have a single report from two different tables? Because I have been reading articles that are saying that it is not possible and a subreport should be implemented? Can anyone clarify this for me?

I've been retrieving the fields that I need for my report with inner join sql statement and setting it as the data source of the report that I had created but it doesn't show up when the crystal report viewer is loaded. I had the correct syntax based on testing on what is retrieved by the statement, the only problem is how should it be shown in a single report.

View 3 Replies

Binding Data From Multiple Columns Into A Single Checkboxlist?

Jan 2, 2010

a checkboxlist control on my page and each item relates to a boolean value column in a flat table on my sql server. I've worked out how to transpire checked listitems into the table ok, but I'm having problems auto populating the checkboxlist with the boolean (selected or not) columns.

View 5 Replies

Databinding To Multiple Textboxes With Single Data Source?

Oct 17, 2011

I'm working on a program that is interacting with a simple Access database. When the form loads there need to be multiple text boxes that are bound to the same table and field in the database, Inventory_Table.Quantity, to display the quantity of the inventory. From there, orders are read into the system adjusting the inventory as necessary.

I need to specify what row these are each supposed to be bound to, because right now it is binding them all to row 0, which makes sense but is not what I want. Is this possible? Heres the code I have to bind currently.

txtTopQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
txtLegQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
txtFastenerQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
txtShortQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
txtLongQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))
txtWheelQuantity.DataBindings.Add(New Binding("Text", myDS, "Inventory_Table.QUANTITY"))

View 1 Replies

Sharing Data Between Multiple Projects In Single Application?

Jun 11, 2011

I have a windows forms application with one exe and several dlls(Class libraries) in a single solution. The application uses common data that is used across all the dlls. I would like to load the data when the application is starting up and use the loaded data at various points in the dlls so that I do not have to load the common data again and again. How can I share the data loaded in main EXE across the DLLs?

View 2 Replies

Using Single Binding Navigator With Multiple Data Sources

Feb 10, 2010

I have a winforms app access a database with 6 tables. Out of 6, I am showing 3 tables on three different tabs on my Form. However, I want to do it using a single binding navigator that will use / change the respective binding source dynamically, depending on the tab that is activated by the user. I have separate binding source for each of the three tables.

View 3 Replies

How To Prevent .net Combobox From Displaying Multiple Results From A Single Data

Dec 9, 2010

I am currently having a headache on how to solve this problem that i am facing.here is the situation:I have a combobox and a list box on the main form. The combobox will get the data from the ms access database.In the database, i have the details of a person's IC, Name and DOB say for eg on one entry I have D215311523C,SHAWN,13/04/1987

So now, my combobox on form load will show the list of dates in the database to allow the user to search base on the date itself by clicking on the selected date. So when the user clicks on the particular date say 13/04/1987, people in the database whose birthday is 13/04/1987 will be shown on the listbox.Meaning to say if i have 3 entries whose dates are the same 13/04/1987, 3 entries will appear. If there is only two entry, then two results will be shown.

[Code]...

View 1 Replies

Is Running Multiple Threads Faster Then A Single Thread On A Single Core Cpu

Dec 23, 2009

Say I have a code with 3 methods that do some pretty intensive work. Would executing these methods on 3 seperate threads be faster then executing them one after the other on a single core cpu? And what if it's a dual core or HT?

View 8 Replies

[2008] Multiple Results - Data Entries In My Database That Have A Common Field

Jan 31, 2009

I have data entries in my database that have a common field. For example:

account_id type user_id

1 new 1
2 old 3
3 new 1
4 old 1

I am using a query like this(mysql): SELECT account_id, type, user_id FROM table WHERE user_id = 1

This is just all theoretical. The problem that I am having with this is it is only returning the first result in this case account_id 1. How can I get it to find all the results with the user_id 1 because in the way I am thinking that it is failing is that it is finding only the first result and then ending?

View 1 Replies

Saving Data From A Text Field And Multiple Combo Boxes To A File On A Server In VB 2008?

Apr 28, 2010

saving data from a text field and multiple combo boxes to a file on a server in visual basic 2008

View 1 Replies

Items Display - Filtering - Search - Based On Multiple Points Of Data

Jan 23, 2012

Well I have a list of things I want to search based on multiple points of data...for example Resolution, 3D capable, touchscreen capable....etc....What is the best way for display someone can think of & filtering results by capability, I have none of it typed out, etc...like list of objects & capabilities, etc... alreat...so it can be made any way that is thought to be good(with speed as well) for many different listings...say 1,000 of them & it filters pretty much instantly....reading capabilities & such & the list itself is easy but how can I make a filter(unchecking something brings back things, checking something takes away only since well your adding capabilities to filter selection....I have pictures that can go with items too as well as a name & more information could be given directly with the method or clicking on the picture/item.

View 13 Replies

Combobox In A Datagridview Single Field?

Apr 24, 2010

I am developing a new project for my daily office use using access database with vb 2005.

In this project I have one bounded datagridview and it is ready to use.

I want to alter a particular field value in the datagridview regularly. so whenever I click the rowheader that particular field should be editable with a combobox with some value, after selection of the value and leaving that particular cell it should be updated with the appropriate record in the database.

View 7 Replies

Editing A Single Field Of A Database?

Mar 9, 2010

with editing a single field of a database. variable dS is my dataset variable in which i have filled with the tables of my database. since its my first time in database management with vb.net

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
If txtPOno.Text = "" Or txtDate.Text = "" Or txtSuppCode.Text = "" Or rBOM < 0 Or

[Code].....

inorder to pass. honestly, i really think that im using a BRUTE FORCE method.

View 2 Replies

Asp.net - Populate Label From Single Field In Sql Server

Sep 15, 2010

I have a column in a table that contains a message and I want this message to be displayed in a label. Here is my code which currently doesn't populate the label.

Protected conString As String = ConfigurationManager.AppSettings("sqldirectory")
Dim cnn As New SqlConnection(conString)
Dim cmd As New SqlCommand("select message from [database].[dbo].[table]")

[Code]....

View 1 Replies

DB/Reporting :: Updating A Single Field In A Database

Mar 20, 2009

I'm using an access database in a program that I'm making for my school, the user is able to select an item from the menu, then it sends it to a list box, there is also a textbox to put a quantity of how much of the item you want. I have a field in my database called Amout Ordered, I want to update it with the amount of each item ordered, and I can't figure out how.

View 1 Replies

Output A Single Line From A Text Field One By One?

Nov 28, 2010

For example the user has typed a list of names in a text field (1 on each line)

jerry
mark
mark93
ewji84
fjkewo93

the program will auto fill this in the submission form jerry

when it finished the first registration now moves on to the second string:
mark

and so on....

I already made the multiline text boxes and the main functionality of my bot,
all I need now is the program to submit multiple keywords from user input and it should be 1 keyword in the field per submission.

View 3 Replies

Update Date & Time Together To A Single Field?

Sep 17, 2010

I am trying to upate date value as well as time value to a single datetime field.I can update date or time by using today.date or today.time separately.But I don't know how to update both to one field.

View 2 Replies

Assign Several Field Values In A Datatable Into A Single Text Box?

Jul 9, 2009

I have this working for a single field in a text but im trying to add more than one fields data .[code]...

View 7 Replies

Matching One Field Of A Database With Single Entry In Listbox?

Jun 9, 2011

i connect database with vb.net and also i receive a single value from my receiver through serial port. now i want to match this single data with one field of database. i have attached my code.

Public Class Form1
Private Sub OPEN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 1 Replies

Saving A Text Field That May Contain A Single Of Double Quote?

Jun 16, 2010

I am saving a text field that may contain a single of double quote.' or "If i use a double quote in my SQL save funciton I can save and use single Quotes. When I use a Single quote I can save Double Quotes. Yet not both.People use both, so I would like to know how I could change the delimiter to something other than a Double Quote for my text saves

View 3 Replies

Show Table Row While Selecting The Single Field From Listbox?

Mar 21, 2012

i am trying to make a vb.net project for a travel agency ..... i have make all of the content of it but i got stuck in listbox .... i have added onnfiled of sql table into the listbox and now i want that when i select the list box content then all the other fields of a the row will automatically come in the rest of the textbox so i can add and delete it manually....... here is my code..... of one form(i have made 13 forms like that)

[Code]...

View 1 Replies

Update A Single Field In A Row In A Database By Clicking A Button?

Jul 16, 2009

I have two buttons on a form , clock in and clock out, and i have two fields in an access database, fldCheckIn and fldCheckOut, when i click the check in button i want it to get the current time and set it to the field in the database

View 13 Replies

Check If A Field In A Data Table Is Null Before Creating A Textbox Bound To That Field?

Feb 24, 2010

I am building a data based application using VB 2008 an SQL Express. I need to create textboxes on my form using code, (With & End With) method. I need a simple code string that will allow the app to check if the field to wich the textbox wil be databound is Nul, If so the textbox will not be created.

View 8 Replies

.net - Pass An Expression To Act On A Single Field In An Anonymous Type In LINQ?

Mar 27, 2012

I have the following Data Transfer Objects defined:

Public Class MemberWithAddressesDTO
Public Property Member_PK As Integer
Public Property Firstname As String
Public Property DefaultAddress As AddressDTO
Public Property Addresses As IQueryable(Of AddressDTO)
End Class

[Code]...

View 1 Replies

Pre-defined Class In .net 2.0 To Hold A Single Generic-typed Mutable Field?

Jun 20, 2011

In a number of my projects, I find myself declaring a rather boring class:

[Code]...

to e.g. allow an object to give information to another object in such a way that the information can be mutated later wherever it goes. For example, in a Dictionary(Of String, Holder(Of SomeImmutableType)) it's possible to update the thing of SomeImmutableType without having to change the Dictionary itself (since the Dictionary's entry for a given key will always contain the same Holder object, that Holder object may be used as a lock).

[Code]...

View 2 Replies

Sql Server - Linq - Limit List To 1 Row Per Unique Values Based On Value (minimum) Of Single Field

May 3, 2012

I have a stored procedure (I cannot edit) that I am calling via linq.

The stored procedure returns values (more complex but important data below):

Customer Stock Item Date Price Priority Qty
--------------------------------------------------------
CUST1 TAP 01-04-2012 £30 30 1 - 30
CUST1 TAP 05-04-2012 £33 30 1 - 30
CUST1 TAP 01-04-2012 £29 20 31 - 99
CUST1 TAP 01-04-2012 £28 10 1 - 30

I am trying to limit this list to rows which have unique Dates and unique quantities in LINQ. I want to remove items with the HIGHER priority leaving rows with unique dates and qty's.

I have tried several group by's using Max and order by's but have not been able to get a result.

Is there any way to do this via linq?

EDIT:

Managed to convert brad-rem's answer into VB.net.

Syntax below if anyone needs it:

returnlist = (From p In returnlist
Order By p.Qty Ascending, p.Priority
Group By AllGrp = p.Date, p.Qty Into g = Group
Select g.First).ToList

View 1 Replies

Merging Multiple Sheets From Multiple Workbooks Into New Sheets In A Single Work Book

Dec 13, 2011

I am looking for the code to consolidate multiple .xls sheets from within multiple work books in a file all containing the same format of information. Each sheet needs to be coppied to a new sheet within a single work book.

Once in a single sheet I need to then copy data from a range of fields into one consolidated sheet.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved