Data Structure To Represent Bookable Timeslots

Apr 27, 2009

What suggestions do people have for a timeslot data structure? I have a number of activities and I'm planning to display them in a datagrid with days as columns and timeslots as rows. This suggests to me a timeslot data structure with 5 properties for the five days (the columns) for every value I want to use e.g. a timeslot ID and the number of slots left.

So.

Property Day1ID
Property Day1Slots
Property Day2ID
Property Day2Slots
Property Day3ID
Property Day4Slots
etc

Then each TimeSlot structure would be for a specific time. say 9:00 and another for each hour after that. Then I'd have a list of timeslot structures that will auto bind against the datagrid. I'm exploring new ground here and as you can see I'm not very clear on what/how to do it?

View 2 Replies


ADVERTISEMENT

Store And Represent Data?

May 31, 2011

I'm creating a program that outputs Quotations (and other information relating to these 1. What is the BEST way to read/write from a database (I only really know how to use Access but if XML or SQL would be better, I'm willing to learn). The database needs to be stored and accessed from the same state every time that the program opens. I've tried multiple different ways, both through DataAdapters (in code) to doing it through connecting the database through the Visual Studio GUI. Neither have seemed to work. Other people have told me that using DataAdapters and such aren't the best way, but no one has been able to tell me what this 'best way' is. Also, I need to somehow be able to link pictures in the database - apparently it's not easy to do in SQL?[code]...

View 5 Replies

How To Represent Data In A Tabular Format

Feb 8, 2012

i can retrieve the data from the DB and put it in a vector and then, vector in a JTable, to display data in a tabular format in java, all i wanted to know is there any similar way in vb dotnet?

View 4 Replies

Set Up A CLASS To Represent A Data Stream?

Apr 1, 2009

I'm trying to set up a CLASS to represent a data stream.This is a newbie question so if the answer is obvious, please excuse me.Several of the data items are multiples which I would normally represent as an Array element.For example, in the code below, the element SolarNameplate has up to 10 instances, so I'd like to use array notation.I get errors, and it doesn't work, so I assume I can't do it like below.

QUESTIONS : 1 - is it possible to use an array element in a class ?

2 - is there another way to achieve what I want ?

Public Class SM1PS01
Private _Projid As String '... name or number of project
Private _LogoFile As String '... file containing customer logo[code]...........

View 18 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

Need Right Data Structure

Jun 22, 2010

I have a list of a few thousand names. I actually have last name, first name, phone number, etc and more info. I'm going to make a class to contain the data. so I'll have like a people object with for example a last name field. I'm going to store these in like an array list. Lets say i have 100 items in array list. Maybe last name smith is on index 3 21 and 63. I'd like a data structure where i can easily search for smith and get indexes 3 21 and 63. Brute force is simply loop through complete array checking last name and grabbing index each time i find smith. Ideally id like to have more efficiency. In c++ I'd use a multi map but i don't see that that exists in vb.net. A dictionary wont work because its 1:1.Name of data structure, short description of how to use it and web help reference page would be nice.

View 2 Replies

Use Data Structure In VBA ?

Feb 14, 2008

I would like to use data structure in VBA. the code like

Public Structure employee

Public firstName As StringPublic middleName As String

End Structure

But there was compile error: Expected :end of statement. Can I use data structure statement in this way? how to use data structure in VBA?

View 4 Replies

Changing Data In A Structure?

Nov 25, 2009

I have some structures and I change the data inside a loop. This works ok. But as soon as the method ends, all values in the structure are reset???

Heres my

Private Sub ReadDevice(ByRef device As Device)
Console.WriteLine(" Reading device " & Device.name)
Dim data As Short

[Code].....

View 5 Replies

What Does & H57 Represent And How To Translate It For C#

Jun 1, 2011

I'm trying to convert old VB.NET code into C# and I'm not sure about the current line and what it means really.

[Code]....

View 5 Replies

.net - Data Structure For Text Adventure?

Nov 6, 2011

I'm designing a choice based adventure game in VB.NET 2010, where you are presented with a story label, and you choose between 2 buttons, which choice you want to make. I want to know the most efficient way to do this.My goals are to store the labels for the buttons and the story in some form of data structure, which is temporarily a hash table right now, and some form of structure for the choices. Right now I am using a custom class that references the indexes of the next 2 choices and their respective label indexes which stores the class instances in a hashtable.I've looked into things like arrays, dictionaries, lists, and collections, but I'm not sure which one best fits what I'm after. Any .NET data structure would work. What is the most efficient data structure for these 2 pieces of data? Would just a string array work?

View 2 Replies

Calling Function On DLL To Get Data From Structure?

Apr 16, 2012

I have problem about how I call a function on DLL to get data from a structure. Have a C++ example about how it's works the library, and I want to use it on vb.net. his is the working c++ example:

Declaration:
BOOL (WINAPIV* MyFun)(DWORD start1, DWORD stop1, P_RESULT pResult, PDWORD pTpNum, myCALLBACK lpFunc) = NULL;

Call:
// pStruc = RESULT structure
// TrpNum1, TrpNum is ULONG
ULONG TrpNum1=0;
MyFun(Start,Stop,pStruc+TrpNum,&TrpNum1,&myCB);

Callback:
void __stdcall myCB (RESULT *pStruc) {
printf ("%.3f", (double)pStruc->val1);
tpn++;
[Code] .....

The error is this: "Attempted to read or write protected memory. This often indicates that other memory is corrupt."

View 1 Replies

Fill A Structure With Data From A SQL Table?

Feb 7, 2011

Is there an easy way to get data from a table in SQL Express and put it into a Structure? The table has one string column and five bit columns. I'm using VB.net

View 13 Replies

How To Pass Structure Into A Data Layer

Feb 19, 2011

I'm creating a Data Layer for a Web Application and in one of my functions, I need to pass in a Structure full of Customer info. This Data Layer is essentially a DLL. My problem is that I'm not sure how to do this.Below is my code and what I want to do.

[Code]...

View 5 Replies

Integer Data Type Is Structure?

Mar 7, 2010

Is the integer data type is structure? And if yes what is the original code of it?

View 2 Replies

Store Data In An Array Using A Structure?

Jun 6, 2011

im tryin to store data in an array using a structure. However, the code im using keeps returning a null referece exception, even when there is something in the input boxes. This is the code im using:

With SaveInfo(Index)
.EmployeeID = EmployeeIDComboBox.Text
.EmployeeName = EmployeeNameBox.Text

[Code].....

View 6 Replies

Structure For Large Quantities Of Data?

Jul 3, 2010

I have a large amount of data (400 variables recorded 2 times per second) which is output from a factory monitoring system. It is stored in encrypted files in blocks of one hour from which i can extract to csv with a small piece of software.I would like to upload these csv files into a single database from where i can make graphs, analysis or whatever over longer periods.

The csv files have one line of data per 'time stamp', each of which can be conceptually segregated into approximately 15 individual pieces of equipment.I can quite easily import the data into a single table. However, i find that, very quickly, i end up with an enormous file (about 700mb/month) which is extremely ponderous to work with.

is it possible to split the table into 15 separate tables related by 'time stamp' and second, can each of these separate tables be saved in separate files in storage memory (such that only the files with the desired data are imported into ram).

View 13 Replies

How To Represent Unicode Chr Code

Jun 29, 2010

I know you can put unicode character codes in a VB.Net string like this: str = Chr(&H0030) & "More text"..I would like to know how I can put the char code right into the string literal so I can use unicode symbols from the designer view.

View 5 Replies

Represent Backspace In A String?

May 9, 2011

Below is the code I am using to restrict user from entering any other characters except for the predefined ones. But using my code I cannot hit backspace.

How to include backspace also ?

Dim s As String = "0123456789$"
If s.IndexOf(e.KeyChar) = -1 Then
e.Handled = True
End If

View 3 Replies

Structure Inside Another Structure Receives Null Reference Error?

Jan 5, 2012

Module Module1
Public Structure structure1
Public TRANS() As structure2
End Structure
Public Structure structure2
Public X() As Integer
End Structure
End Module

View 17 Replies

Array In Structure Apparently Not Retaining Data?

May 6, 2012

I have a structure with 6 arrays inside it that is serializable so I can save the arraylist of them to a file and load them from the file. This part works.

When loaded from the file the data from a single specific record is populated to a listview control, this works on form load. The user can then select different records and in theory display the data in them (specifically the stuff in the arrays).

Displaying the data works as I'm editing the data, and on first load of the form and displaying the "default" record from the structures. Any other time (trying to switch between records during editing or after loading) the record is pulled (as shown by stepping through the code line by line) but the data in the arrays in the structure and only the data in the arrays is missing.

I've gone through all the code that runs and there is nothing that overwrites the array data in the records between displays so I'm at a complete loss as to why this data is going missing.

Below is the structure and the code.

Defined in a Module so as to be accessible when needed in several places through the program:

Public JBonus As New JobBonuses
Public JBonuslist As New ArrayList

On load to set dimensions to the arrays:

JBonus.Str = New Integer(999) {}
JBonus.Agi = New Integer(999) {}
JBonus.Vit = New Integer(999) {}

[Code].....

View 1 Replies

Array Structure With Values For Each Data Type

Nov 8, 2011

I epochly failed creating an array structure. How would I build it like I tried to do with values for each data type.

Structure PovertyGuidelines
Dim Id As Decimal
Dim NumberOfPersons As Decimal
Dim AnnualIncome As Decimal
End Structure
Private Data(20) As PovertyGuidelines
Private Id(,) As Decimal = {{1D, 2D, 3D}}
Private NumberOfPersons(,) As Decimal = {{6D, 9D, 7D}}
Private AnnualIncome(,) As Decimal = {{24000D, 32000D, 27000D}}

View 1 Replies

Asp.net - Preserve Data-structure On AJAX Postback

Dec 29, 2009

[Code]...

The first time the page loads my structrure is filled correctly. After an AJAX postback all the structure fields are setting to nothing. (It seems that the Dim OldPInfo As New PInfo is called again), but i should better ask the SO Experts.

View 1 Replies

Copy Data From One DataTable To Another With Diffrent Structure?

Apr 23, 2011

I am copying data from DataTable to another DataTable with a structure.I have to hardcode coulums number in the loop and copy the data in object array.[code]...

View 2 Replies

Data Structure Memory - System Resources

Feb 27, 2009

I was wondering if there was a way to find out how much memory a data structure too up. So say I declared a list of strings.
Dim theRN As New Dictionary(Of String, Integer)
Say it had 25 elements in it. How to find out how much memory those 25 elements are costing me?

View 3 Replies

Extracting Data From CSV File Into Searchable Structure?

Jun 25, 2010

I have a csv file with 48 columns of data. I need to open this file, place it into a data structure and then search that data and present it in a DataRepeater. So far I have successfully used CSVReader to extract the data and bind it to myDataRepeater. However I am now struggling to place the data in a table so that I can filter the results. I do not want to use SQL or any other database.

So far, this is working in returning all records:
Private Sub BindCsv()
' open the file "data.csv" which is a CSV file with headers"
Dim dirInfo As New DirectoryInfo(Server.MapPath("~/ftp/"))
Dim fileLocation As String = dirInfo.ToString & "data.txt"
Using csv As New CsvReader(New StreamReader(fileLocation), True)
[Code] .....

View 2 Replies

Saving And Loading Data Structure Items

Jun 20, 2012

I am quite new to VB.NET and I am attempting to create a console application that can write, save, load and edit sets of data. Lets say I have something like this:

[Code]...

However, I have no idea how to load the data so I can manipulate it in the EMPLOYEE structure system. I am not sure if I have made my question clear enough, for as you can see I'm quite new to programming and am not essentially familiar with the terms of speech.

View 1 Replies

Take Data From A Text File And Place It Into A Structure?

Oct 8, 2010

Attempting to take data from a text file and place it into a structure.

Option Strict On
Imports System.IO
Public Class Form1
Structure Employee

[code]....

View 3 Replies

Convert Numeric Value To Represent 0 To 1024

Nov 19, 2010

I am reading a pot that has a range of 1000 to -887.I need to convert that numeric value to represent 0 to 1024Where 1000=0 and -887 = 1024.

View 4 Replies

Declare Textboxes Or Labels That Represent Them?

Oct 5, 2009

I have a parcel post assignment, and i have three textboxes that represent height, width, and length. here are my questions1. how do i decalre them as integer? do i decalre the textboxes or the labels that represent them?2. how do i multiply all three together and multiply the total by 4pence and add 20p?

View 6 Replies

Use Pictureboxes To Represent A Variety Of Items?

Jan 14, 2011

I'm pondering a design that will require zooming. My intention was to use pictureboxes to represent a variety of items, and I have the code written to draw on those pictureboxes, as needed. However, there will be many pictureboxes on the form at any one time, though only a portion of them will be visible. That shouldn't be a problem, necessarily, as there isn't any issue with having controls that are not on the visible area of the screen. My issue is that when the user rolls the mouse wheel forward or back, the image will have to scroll in or out, which means that the location and size of the pictureboxes will have to scale relative to the point where the mouse is located.

Technically, this would be more easily accomplished using graphics directly, since I can use ScaleTransforms and...uh...one other, to do the scaling. However, I would prefer to stick with the pictureboxes because I will be doing lots of drag and drop work with them (dragging things into and out of them), and that code is already written. If I were to change that to use rectangles and circles drawn dynamically and scaled dynamically, I'd have to use some kind of hit testing to figure out which object I dragged or dropped onto, and where. Therefore, switching away from pictureboxes would require a fair amount of recoding. There really shouldn't be a problem scaling and translating the controls on the form, but rather than writing the math behind that, I was wondering if there were any built-in tools that will do it for me or will help with the process.

View 9 Replies







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