Forms :: Using Large Database In WinForms?

Dec 27, 2009

I am currently helping to write a Visual Basics program that was originally writing with access.The Original Access program has been used and modified over the past 5 years, During that time the database has gotten pretty big.The problem I am having is If I add the entire database to my data sources it creates data tables for every Table and Stored procedure even when they are not currently used in the program resulting in a 20+ minute build time just to debug.I am currently only adding Tables and Stored Procedures as i need them, so its not that much of a problem now, but as I continue to work and add tables the build time is going to go back up, and Id hate to have to wait 20+ minutes to test a small tweak I made.

View 1 Replies


ADVERTISEMENT

Get Templated Starter Database Driven Forms Generated In C# Winforms SQL Server Using Some RAD Tool Or Visual Studio 2010

Aug 11, 2011

I hope I got all that in this question title. Let me explain. We are starting on small desktop app that will snowball into a big app with many forms. The database is SQL Server. It will have classic stored procs/functions performing classic CRUD functions. Given a table or stored proc in SQL Server what is the quickest way to create a form with all the hooks to maintain a table.

For e.g. lets assume I have table like this (most code below is pseudo code)

Table Employee
{
Name varchar(30)
DOB Datetime
Address varchar(100)
}

From this as source I want to create my Target which is form with 3 labels and 3 textboxes with add delete modify buttons (or OK button to add if not exists or modify if exists)

[Code]..

The code generation tool or technique that will be used should generate the correct db hooks (create SQL parameters, SqlCommand, execute sql.. basic try catch etc. Is there any open source tool to do this ? Some trick or templated approach via VS 2010 ? Worst case any third party tool ?

View 3 Replies

Make A Large Grid Of Buttons (24x20 Or Similar) Using Winforms?

May 7, 2012

I'm making a seat booking system in vb.net (WinForms) and I need the user to be able to select the seat they wish to use and for it to change colour (so they can tell that it selected).

I began to try using buttons, but 480 buttons seriously slowed down the load time for the form. I then tried a data grid view with buttons in the rows/columns, but couldnt make that work properly.

Would it be worth trying to use 480 picture boxes and change their background colour? Or would that just slow the form down the same way as 480 buttons?

View 2 Replies

.net - Given A Large Number Of Objects, Create Multiple Forms In Designer For Them Or Use Code To Create The Forms?

Dec 29, 2010

If I have a large number of classes, each similar to the other in certain aspects (they all share a common base class, but each does things differently), and I need to create Windows forms for each to allow easy changing of their values through a GUI? Create one matching form for each object in VS' forms designer, Or Use code to create the forms dynamically at runtime.

#2 makes the most sense to me, because a lot of these objects will share very common features of the form, notably "Ok" and "Cancel" buttons. But one object might need to draw a textbox on the form while another might need to draw a combobox. Not to mention, if I want to put icons on the "Ok" and "Cancel" buttons, I'd have to do this for each copy of the form in designer, and that sounds like it could get out of hand quickly.But is drawing forms through code sane? VS' forms designer is pretty sophisticated and designed to make life easier. Am I wise to consider ignoring its functionality and diving into the trench warfare of forms design through code? Or are there examples of automating form creation based on an existing object's properties?

View 1 Replies

Forms :: How To Split A Large Application

Mar 17, 2009

I have a large financial application which I am migrating to VB.NETIt has two main components: charting and financial statements.I want to know if it is possible (and how) to create a main exe, and then two separate projects for the two components (as dll's?).

View 3 Replies

Localizing Large Number Of Windows Forms

Oct 12, 2011

I'm working on a project that involves localizing a large number of Windows Forms. We're dealing with layout using the TableLayoutPanel control, which works nicely. One area we're striking problems with is when we set the Form.Localizable property to True, we then end up having to manage one .resx file per form per language.

That would be fine if the .resx files only contained the Localized text, but it also contains a vast amount of layout data for the form. Is there a way to separate the localizable text elements from the control layout information, that continues to work in the visual studio IDE? I've noticed that I can modify my the form's designer file to look at another resource file, but when I use the form designer, these changes are deleted:

'Label1
Me.Label1.AutoSize = True
Me.Label1.Dock = System.Windows.Forms.DockStyle.Top
Me.Label1.Location = New System.Drawing.Point(3, 0)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(61, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = My.Resources.ResourceManager.GetString("Form1_Label1_Text")

View 2 Replies

VS 2010 Cascade Forms - Large Ones In Back

Mar 11, 2012

I've got a collection of a type of form and multiple of these can be displayed on the screen independently at the same time and now I'm wanting to add the ability to cascade these forms, but these forms can all be re-sized so it'll be very rare when they are of the same or similar size. I would like to be able to cascade them based on their present size, so the largest for is in the back and the smallest is in front.

I also realize that a form could be wider than than another form but that other form is taller than the current one, in which case I would like the taller form to be considered the larger one (an arbitrary decision, I know). Here's the code I currently have that cascades them in the order they are in the collection, I just need to know how to re-order them based on their size.

[Code]...

View 5 Replies

VS 2008 Form KeyPreview On Many Forms Of Large Application

Apr 11, 2012

As quick solution to the user wanting to be able to open a particular form from any other form (in a large application with many forms, not an MDI app), I added KeyPreview to each form and corresponding KeyPress event so that said form will open (ShowDialog) upon pressing F12 from all these other forms.

Since this update has been in place, the user has been getting intermittent (maybe 2 or 3 within the course of a workday) but nasty errors such as "exception has been thrown by the target of an invocation" and the dreaded "out of memory". Is there reason to believe (off the top of your head) that the KeyPreview could be causing this?

View 1 Replies

Forms :: Updating Large List Instantly - Datagridview Vs. Listview ?

Nov 1, 2011

What I am trying to do is to instantly apply a filter to a large list of data such that the list is updated almost immediately regardless of the number of items in the list. I have this working using a listview right now but it is far from instant, a list of 5000 items takes over a minute to get through. What I do currently is to maintain a cache of my data that my listview entries are based on. When the user selects a filter I parse this data one item at a time and determine if each item should still be displayed in the listview, if not I remove it. The complexity of determining whether or not a data entry meets the filter requirements is O(1), but just getting through each element in a loop takes significant time, and so does updating the list view graphically at the end of the process.

I have considered using a datagridview instead, using a database connection. I have never done this before and my main question here is whether this would allow me to do what I have described. With the database I could form an SQL query to return only the items that meet the new filter requirements... but would the data in the form update immediately, or would there still be significant delay?

View 3 Replies

Forms :: Delete Cookies In Winforms?

Nov 27, 2009

I've been trying to know how to delete all the cookies of a domain, created by using the WebBrowser control.I know that to invalidate a cookie, it's necesary to set its expiration date in a point of the past (a negative value), but all the information I found is for web developing aplications, and I'm using a form.

View 4 Replies

Forms :: VS2010 WinForms Labels?

Nov 4, 2011

I have a label that displays text kinda like a title to something (autosize = falseTextAlignment = MiddleCenter) and whenever the label control isn't wide enough to display the single line of text it tries to auto-wrap it causing half of the text to be chopped off at the top and half of it chopped off at the bottom. I would rather it stay on a single line and cut the text off from the right

View 1 Replies

Have Forms In Sub-namespaces Of A WinForms Project?

Oct 15, 2010

If I create a new class library project in VB.NET, I can create subfolders (a la C#), add WinForm objects to these subfolders, and then specify a namespace:

Namespace Sub1.Sub2
Public Class SomeForm
Public Sub New()
InitializeComponent()

[code]...

This resolves as ProjectRootNamespace.Sub1.Sub2.SomeForm, which is good.However, if I create a new WinForms project in VB.NET, and attempt the same thing, I get this error in the designer:The class SomeForm can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again.Is there a way to have forms in sub-namespaces of a VB.NET WinForms app instead of in the root namespace?

View 1 Replies

Winforms - Custom Constructors For Forms In .net?

Nov 1, 2010

I would like to open a new form from some other form, and pass some selected object from a control on that form to the new form. The sensible way to do this, I thought, was as a parameter to the forms constructor. Now I know that the visual studio GUI creates partial classes for my forms, that hold the properties that I can drag onto there in the designer. I assume it also holds a default constructor. Since it might do all sorts of stuff that is needed to initialise the form, I figured I should call it from my custom constructor ala

public sub new(byval my_parameter as Foo)
Me.new()
Me.my_parameter = my_parameter

[code].....

That clearly wasn't it, because it can't find a default constructor. The thing is, visual studio goes trough great lengths to prevent me from seeing the generated constructor, so I know how to access it. This leads me to believe that I am actually doing it wrong, and should have set out on some different path, as the path you are forced in to usually is the sensible thing to do, which I usualy find out way too late.

View 3 Replies

Winforms - Friend Vs. Public For .net Forms?

Jan 19, 2010

Is it better to use friend or public forms in vb.net? What are the advantages of each?I notice when you import a vb6 project, the forms come in as friend, but when you add a new form in vb.net it is public. I have not seen any difference in the way they work, though, so I must be missing something.

View 3 Replies

Winforms - Passing Values Out Of Forms?

Sep 8, 2011

I have a very simple windows forms setup. Form1 has a progress bar and a button on it, when clicked the button opens Form2 which also has a button on it that launches Form3. On Form3 is a button which I want to use to raise an event back to Form1.To achieve this can I add an event handler on form1 that will listen for an event of the type raised in form3? Or do I have to pass references to form1 to form2 and then from form2 to form3?

View 1 Replies

Winforms - Unload All Open Forms ?

Feb 26, 2009

In the middle of converting VB6 code to VB.NET, I need to replace the following code that intends to close all open forms remaining in the application.

'close all sub forms
For i = My.Application.OpenForms.Count - 1 To 1 Step -1[code].....

I've replaced the Unload function with Close (as indicated by TFM), but the compiler complains that OpenForms is not a member of My.Application.Where can I access the open forms?

View 4 Replies

Show A Large Amount Of Data That Spans Across Multiple Forms And Text Boxes?

Jan 15, 2011

I am trying to find a way to show a large amount of data that spans across multiple forms and text boxes. I am making a somewhat summery of the input strings.

View 3 Replies

Handle A Very Large Database?

Mar 13, 2012

I'm faced with a (fun, actually) data mining problem; I have raw ASCII files from instruments, and I want to move that data (~100 GB) into a database, then be able to run various algorithms determining correlations of time series, etc. I would like to write the mining algorithms in Visual Basic (.net, VS 2010 right now), and be able to do visualizations with VB code I have in hand.On the nature of the data: think of a set of several thousand devices, each recording a measurement at a given interval - so I'm talking time-series vectors.

I spent today re-acquainting myself with VB.NET's interface to (in one case) a Microsoft Access database. What used to be fairly simple - DAO I think it was - involved tables, recordsets, etc (and that would likely be fine). Now I seem to be required to have a weird variety of generally useless objects, e.g. 'adapters', 'datasets', etc. The problem is that I know exactly what I need, and all this extraneous stuff just gets in the way (certainly in coding complexity and opaqueness, and likely in efficiency as well).If any of these mechanisms gave me a kind of virtual access to the entire dataset, and let me control caching parameters, etc.it might be great, but I found nothing along those lines.

Anyway, I tried a number of different approaches, and none seemed at all aimed at what I need to do: efficiently do math on a large dataset. I can't believe I'm the first to have this problem, but I can find no useful wisdom out there. I'd be comfortable with pretty much any underlying database mechanism: MySQL, SQL Server, MS Access, but ideally something generally SQL based (I may eventually have to transition this entire system to draw from a client's SQL database, though that's not an overriding concern now). Other than that I want simplicity and efficiency. I thought my old ODBC techniques would work, and to some extent they do, though modifying tables seemed to have bizarre problems (no errors, but not modifications either).

I do have a fairly aggressive deadline to show some algorithm results, so my focus in the short term is to get something reasonable working *in* the short term - in other words, it's less important to me to pick the 'fastest' relational database than it is to pick a database that lets me focus on coding the algorithms, not working through tedious data access coding. If this db could be any smaller, I'd have tried to do it all 'in memory' at least for proving concepts; I don't want to have to learn an entire jargon and approach just to be able to retrieve data points, and write out new info (e.g., first derivatives of time series).

Perhaps I'll need to bite the bullet and just write something myself, a .dll perhaps just to save and restore large time series vectors. It seems a bit frightening to me that one would have to do this in this age, what with all the database systems out there, but I don't have much time to work through arcane interface logic.

View 6 Replies

Forms :: VS2010 WinForms App Connect To Dll On Webserver?

Nov 13, 2011

I have a desktop WinForms app that I would like to be able to connect to my Sql Server database that I have through my GoDaddy webhost. Problem is not all ISP's forward the 1433 port (like mine) so I can't connect directly to the DB from any of my home computers without buying the expensive dedicated IP address package, which has me thinking since my website can connect directly to the DB I was wondering if it might be possible for me to make a dll that would have all of the database interaction through subs and functions and all my WinForms app would have to do is connect to that dll through http or something, anyone know if I could do something along those lines?

Reason for this is I would like other people to be able to connect to this database (the winforms app would have screens for creating and managing accounts, etc) without worrying about whether their ISP would block the DB port(s) it would just work.

View 5 Replies

Winforms - .net NUnit (2.5) Windows Forms Testing?

Oct 18, 2011

I am retrofitting unit testing into a fairly complex system designed and written by other developers in VB.net. I am trying to develop unit tests for the GUI forms using NUnit and the NUnit Forms extension. (I've been looking at c# examples that are fairly easy to port over if you have a solution but don't know VB syntax as long as it uses NUnit classes)

I will try and explain what I am doing but first a brief description of the program. It basically monitors server activity. You need to connect to a server via a modal form with IP and Port fields(amongst others). Once you have connected to a server other parts of the program unlock and become usable (such as configuration of the server).

Desired process: Load program > click connect button > modal connect form loads > enter details > click OK to connect > main form updates to logged-in state > other functionality

The problem is that I cannot test the functionality of the connect form and then the logged-in functionality of the program. I can test that it loads the modal connect form correctly; enters the details and clicks OK (all fine so-far) but it does not appear to logically progress the program. The modal form just closes again seemingly without running the connect code from the program back-end and I'm back at the main menu not logged in to anything.

I have a feeling that I've either missed something really obvious or that it's simply not doable in NUnit.I have trawled the internet in search of anything similar but the closest was another SO thread that was really generic. Without being able to actually test the logged-in version of the program, I'm at a major hurdle.Another issue is handling message boxes that don't have unique identifiers (e.g. "are you sure you want to exit?"); these also seem to be a major pain in the arse with NUnit (If it makes any difference, I'm running the tests as a stand-alone project using a reference to the executable file of the built project, not the actual source)

View 2 Replies

Winforms - Deploying A VB 2010 Win Forms Application

Nov 16, 2010

I am deploying a VB.net 2010 winforms application, and when I install it on the client's machine, the install process also installs an instance of SQL Server 2005 Express. The application connects to a central SQL database on the server. To install, I am using the "Publish" option in VS 2010. Why does it do that? There should be no need for a local instance of SQL Express. Is there a way to avoid installing SQL 2005 Express (I know it is free, but I would rather not have it installed if possible).

View 1 Replies

Winforms - NUnit (2.5) Windows Forms Testing ?

Jun 10, 2012

I am retrofitting unit testing into a fairly complex system designed and written by other developers in VB.net. I am trying to develop unit tests for the GUI forms using NUnit and the NUnit Forms extension. (I've been looking at c# examples that are fairly easy to port over if you have a solution but don't know VB syntax as long as it uses NUnit classes)I will try and explain what I am doing but first a brief description of the program. It basically monitors server activity. You need to connect to a server via a modal form with IP and Port fields(amongst others). Once you have connected to a server other parts of the program unlock and become usable (such as configuration of the server).Desired process: Load program > click connect button > modal connect form loads > enter details > click OK to connect > main form updates to logged-in state > other functionality

The problem is that I cannot test the functionality of the connect form and then the logged-in functionality of the program. I can test that it loads the modal connect form correctly; enters the details and clicks OK (all fine so-far) but it does not appear to logically progress the program. The modal form just closes again seemingly without running the connect code from the program back-end and I'm back at the main menu not logged in to anything. I have a feeling that I've either missed something really obvious or that it's simply not doable in NUnit. I have trawled the internet in search of anything similar but the closest was another SO thread that was really generic. Without being able to actually test the logged-in version of the program, I'm at a major hurdle.Another issue is handling message boxes that don't have unique identifiers (e.g. "are you sure you want to exit?"); these also seem to be a major pain in the arse with NUnit(If it makes any difference, I'm running the tests as a stand-alone project using a reference to the executable file of the built project, not the actual source)

View 1 Replies

Winforms - TextBox Validation In .NET And Windows Forms?

Mar 5, 2009

I'm using the following code to validate the text entered by user. It works perfectly fine. But I want to add the backspace feature so as to allow the user to delete the wrongly entered number.I have tried a couple of things and they worked but before last digit (after the decimal point) i.e. it does not allows to delete after the number has been completely entered.number is being entered in the format: 12313213.45

What shall I do?Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress

[Code]...

View 7 Replies

Winforms - Word Wrap In Windows Forms (.net)?

Apr 25, 2009

how to do word wrap in drawstring in vb.net 2005.

View 2 Replies

Load Large CSV File Into Database?

Oct 14, 2009

I'm trying to load a large CSV file into a Microsoft SQL Server Compact 3.5 database. I've tried using the following: Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("filename.txt") MyReader.TextFieldType = FileIO.FieldType.Delimited MyReader.SetDelimiters(",")Then splitting the data with MyReader.ReadFields() etc, before using this data to add rows to a dataset in a database table in my project. However, my CSV files are very large, at above 9.5 million rows, and this takes forever, if the computer doesn't crash also. Does anyone have a better idea for what to do? I would like the CSV file to be loaded into the database table, to enable me to sort it, and undertake some querys and maths. The CSV data structure is:2,193,761.40000000000012,43,1510.22,8,1929.60000000000012,22,2564.52,22,2791.70000000000032,19,2971.6000000000004

View 3 Replies

Forms :: Create Separate Parts/winforms Of The Same Application?

Sep 19, 2011

is it a bad idea to create separate parts/winforms of the same application (using the same SQL Server DB) in different executable files. For example for a School IS: A Receptionist App, A Teacher App, A Principal App and so on.

View 2 Replies

Forms :: Run A Command Line Script From Within Winforms Application

Jul 19, 2010

I am writing an application in which a user is doing a file conversion. I have a set of tools that can perform the conversion on the fly via command line, but I'm not entirely sure of how to go about passing the parameters I need to the command line and running them. Can someone point me to the right direction?Would I just create a System.Diagnostics.Process and use that? If so how do I do the line by line command? For instance if I need to issue a cd command to change the directory and then execute a command after that how would I do that?

View 1 Replies

Winforms - Where And When Is InitializeComponent Called In Windows Forms Control

Jun 25, 2009

In C# Windows Forms, a user control's InitializeComponent is called from the form's/control's constructor. When I create same scenario in VB.NET I don't get a constructor, and I can't locate a place where InitializeComponent is called.I need to call my code between InitializeComponent and when the control's Load event is raised, preferably still in the control's constructor. How do I do this in VB.NET?

View 2 Replies

ADO Open And AddNew Method For Large Database?

Feb 8, 2010

[code].....

View 1 Replies

Best Practice - VB Projects - Using Such A Large Database With Many Tables

Feb 21, 2012

The Adventureworks database is used extensively for tutorials in Visual Basic applications. This has many tables that can be bound to a solution. What I would like to know is, when using such a large database with many tables and using lots of them, is it better to construct your program with a number of projects all under one solution or to put everything into a single project. If you use a number of projects, what is the syntax for accessing each module from a menu strip in your main form? I know how to do this in a single project - all you do is Form(x).show. In Adventureworks, you have a table for Employees that could be put into a single project with a number of forms - one for data entry, one for displaying all of the employees, a filter to a single employee, etc., etc.

If two small projects rely on each other for some reason, again the syntax for linking them could be an issue. Would it be better to combine them into a single project? My reason for asking is that I would feel safer if I created an application on a project by project basis and then brought them all together in one solution. This way they can be tested individually and then linked together where necessary. Making a disastrous mistake in one then only requires a small re-write rather than the headache caused by a total crash of the whole solution. I would like to know which option professional developers take. I am using Visual Studio 2008 Professional and SQL 2005 Express

View 5 Replies







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