Dynamic Database Driven Menus
Nov 15, 2009
I'm trying to construct a database driven VB.Net app that pulls a list of registered accounts from a database and displays the usernames of throes accounts in menu, so the user can select one and a new form open (where they work with it).what I have so far is the constructor for the MDI parent window.[code]What I want to happen is when a user clicks on the context menu a new MDI child form is created and the data in user is passed, however because AddressOf doesn't like passing data this doesn't work.I've looked at delegates and landa expressions but don't think either of them do what I need, the other option is to make my own subclass of the ContextMenuStrip class, which 1) handles the clicks the way I want to and 2) sounds like a nightmare.Before I launch into what I think will be a hell of a lot of work, am I missing something? is their a simple way to do what I want to do? or if not will sub-classing ContextMenuStrip work and if not any ideas as to what will (and if it will, any ideas as to how to start learning how to do that)
View 1 Replies
ADVERTISEMENT
Feb 9, 2010
I have a vb.net 2005 application that I inherited. It is about a 250 screen app, and I am having trouble. Some quick background: There is a form called Mastermenu that every screen in the application inherits from. Inside this form, a dynamic menu is built from an XML file using a custom class called clsMenu. Here is part of the
Private Sub loadmenu(Optional ByVal strAppraisalType As String = APPRAISAL)
Dim objMenubuilder As New clsMenu(New clsMenu.MenuEventHandlerDelegate(AddressOf HandleMenuClick), MyController, FORM_NAME)
[code].....
View 10 Replies
Jan 22, 2010
So. I'm making a tool for an online game called Shin Megami Tensei.In this game you can fuse Demons, depending on what family of the first demon you fuse and the second demon you fuse come from, and their levels, the outcome changes.This is unimportant though.
However, the application is driven by a database, the application consists of a Demonic Compendium (Index of the demons, including race, family, stats, levels etc.).This application is meant for usage by the community playing SMT, and here is the problem; a person without Microsoft SQL Server cannot run this application.I can't ask the community, some of which aren't very techy, to install Microsoft SQL Server 2005 Express Edition just in order to run this program.
You see my problem?Is there a way to get the program running on other computers that doesn't have MS SQL Server installed?
View 5 Replies
Sep 2, 2010
I have developed a windows application which performs a series of database operations like select, insert, update. I am connecting to Oracle database and its working fine in development system. But, when I deployed this application, I am getting error at StartConnection (which opens the DB connection). After installing OracleClient in client system, its working fine. Now, my question is that do I need to install OracleClient to every user? If so, it will be hectic to do so as its size is around 200 MB and its not possible to ask all the users to install it just for a small application. I have tried adding some OracleClient files like orannzbb11.dll, oraciei11.dll, iraops11w.dll etc. But in vain! Could anyone please suggest me a work-around or a way to accomplish this?
View 1 Replies
Jun 24, 2010
I am trying to have letter templates (word documents) that are stored in sql server VarBinary(max) to be accessed via a web application where they will be edited and saved back to sql server by directors of our company. Then various managers will be able to select an existing template (word document), make any additions, and mail merge with a list of customers to print or save the letters.
I am looking to open up word within a web page much like you would an email in outlook, edit it with spell check and the like, and then save it back in sql server. I am able to get word to open from a file but it is outside of the web application in a separate word document. I am storing the word document in sql server but am unable to open it in word without having to save it to a disk (why should you have to go to a disk for viewing or editing?). I am able to programmatically mail merge but that is in a separate word application.
I am finding bits and pieces on the web but nothing that will pull things together such as embedding word but in a windows app not a web app. Mail merge from a file not from a database, converting a byte array to word in a directory but not on a web page.
View 1 Replies
Nov 27, 2011
I want to create a very simple (to begin with) database driven application. The company I work for have very kindly said they will host any SQL database I create, they have a remote server that we all connect to for files etc.
So I want to be able to create an SQL database that they can host and have my colleagues and I install the application local on our machines.
[Code]...
View 6 Replies
Jun 28, 2011
I am designing a desktop application that will be driven by local data. I am trying to determine the best way to accomplish this. The database would contain about 10-12 tables if I use a database and I would imagine no more than 10000 records in any one table (but honestly 99% of users would not have more than 1000 records). I am thinking about using SQL Server Compact.
Is this a good solution? I can certainly include this in my installation, but I am just wondering if anyone knows of a better solution? If this is the best solution, how would you suggest that I create the tables upon deployment? Should I just run "queries" with create table statements in them from my vb application or include a database file or what?
View 1 Replies
Jun 27, 2012
I am trying to match words driven from a database in a string input using VB .NET
The syntax I am using is so simple:
[Code]...
View 1 Replies
Dec 28, 2009
I am using VS 2008.I am creating a xml with which now i need to attach the name of the mdb file.I dont know if i need to write a query or function.My current database name is Menus.mdb. I have an api which has a ExecuteSql(sqlQuery) Function which automatically connects to the database and returns a dataset.What type of query should I pass here to get the Database Name (Menus.mdb).The name of mdb is not fixed depends upon client to client.
View 2 Replies
Jul 19, 2008
How To on a database driven login form. I'll include the Administration Backend to go along with it soon. Dial-Up users should not use this thread, it is image heavy
[Code]...
View 17 Replies
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
Jan 21, 2009
What is a event driven application.
View 2 Replies
Aug 23, 2011
I'm another newbie with VB (2010) so please bear with me. I am attempting to make a method that is event driven by data threads on the Ethernet port. Simply put, the method is to wait until a data thread from a "Control By Web" 5-input device sends an "information update" data packet to the application, with the application then processing the information. This application is on a private, well controlled network, with no access to the internet. I have a method that is working right now reading data packets when invoked with a timer (see code below) but I really need it to be event driven.
' this is added at the top of the class
Dim tcplistener As New TcpListener(IPAddress.Any, ip_port)
'this is added in the "form1_load" module
[code]....
View 1 Replies
Feb 9, 2010
event driven programming
View 1 Replies
Feb 17, 2010
I am trying to build a dynamic validator for a data entry application. I want to be able to query a table for the validators relating to the current task and then be able to reference class properties based on the description of the validators returned.
ex. Validator = "person/firstname"
How do I get to _clsPerson.FirstName?
View 2 Replies
Jan 31, 2010
I'm new to programming and am trying to learn how to developed data driven application and was wondering which method is recommended? I know there are some debates out there but most of the books I have recommend using object binding, but it doesn't offer any concrete information on how to implement it. I went to MSDN and most, if not all, the documentations are on dataset. So I guess my questions is, object vs dataset, which do you use?
View 9 Replies
May 12, 2009
I am using VS2008 Pro. I have a simple DVD database built. I'm trying to make a data driven app to store my dvd collection.One of my tables is Actors and is structured as follows.[code]On a form in my app I have a combobox. I'm trying to make it list FirstName LastName ie. Will Smith. I know how to make a query that'll take the LastName and FirstName fields and list it as Actor. I'm having a heck of a time getting it to do that in the combobox as it'll only let me use one field for the display and won't let me use the query I've made.[code]I keep getting some error about schema don't match default query. I know I could simply change the table to only have one field that holds first and last name, but from what I understand that's not proper db practice. I've searched this site and google until I was blue in the face at looking at soulutions that don't match what I'm trying to do.
View 3 Replies
Mar 4, 2010
I am using the following code to establish a database connection to my datagridview and Access database. Here I am giving my file path name to the connection. This code works fine only on my computer. To make this code run on another computer I need to change the database pathname in the code. Is there anyway I can make this connection dynamic so that I can make this program run on any computer
Dim Data1 As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=C:\Users\Desktop\Work\Visual basic\alldata.mdb")
Dim Case1 As OleDbCommand = New OleDbCommand("SELECT * FROM case1", Data1)
[code]......
View 1 Replies
May 16, 2012
I am looking to make a database call based on user input. The line I am using is:general_read.CommandText = "SELECT * FROM general WHERE Business_Name = '" & business_name & "';"
business_name is dynamically loaded from:Protected Sub btnLoad_Click(sender As Object, e As System.EventArgs) Handles btnLoad.Click business_name = txtName.Text
[Code]...
The error that is being shown is: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.I'm assuming it has something to do with the variable not being set before the database call is made, but I'm not entirely sure.
View 1 Replies
Jan 14, 2009
i am using b.net 2005. i am generating a crystal report. but when i work in a different computer i have to set the location of the database of the report before i generate. is their any dynamic way to set my database location to the report.
View 1 Replies
Jan 14, 2009
i am generating a crystal report. but when i work in a different computer i have to set the location of the database of the report before i generate. is their any dynamic way to set my database location to the report.
View 2 Replies
Mar 9, 2011
I'm still trying to understand and use Use Cases and Test Driven Development, but having a hard time crossing the line. I'm hoping someone can provide a good example of how setting a datasource and/or databinding a gridview could be accomplished using Test Driven Development. Here is my pseudo approach at it.
[Code]...
View 3 Replies
Apr 25, 2009
How to implement an observer pattern in VB.NET?
Currently I have a lot of working code in VB6 which the company wants me to migrate to VB.NET. Well, that would normally be straightforward ... yes? Unfortunately, not so in our case.... recently, our company decided that I need to modify it to implement the MVC (Model View Controller) paradigm to make it truly OOP and adaptable to TDD (Test Driven Development).
Currently, my move was to start with a simple one, opening a form and then grabbing a piece of text from a textfile and putting it as the caption of the form... now, that is easy.
The problem lies in trying to implement observer patterns ... in the observer pattern I cannot simply call the usual me.caption = mytextstream.ReadLine from the form_load event instead, I need to use objects that would use an interface to register themselves as observers as the form loads but not necessary having to be residing in the form_load event... in fact ... if there is somehow a way for me to make such a thing happen before the code goes through the form_load event then that would more completely separate the View layer from the controller layer which gets implemented through the use of observers and observer related patterns.
View 2 Replies
Nov 30, 2011
Public Class Form1
Class Member
Public Name As String
[code]....
This is what i have so far and its giving me headaches to fix it someone please help with this code assuming that the names and phone numbers of all members are stored in alphabetical order by last name , then by first name in text file residents.txt
View 1 Replies
Aug 5, 2011
I am looking to create an order reference which is something like this
PLC0000001
Where the 1 would be my order id
but lets say it gets to 100 would like
PLC0000100
In VB.NET how could I build up a string like where i know i.e.
the starting part = PLC
Ending part = Order ID
middle = fill in 0's
View 2 Replies
Feb 23, 2010
how to use a dynamic table for my MS SQL database? Im using vb.net 2008...any idea on how to do it?
e.g. - Output
ID LastName FirstName Address Order
001 Doe John Kentucky 10-10
002 Smith Jack Kansas 10-11
View 4 Replies
Jun 5, 2010
I'm relatively new to the vb.net framework and object oriented programming. After perusing the threads for a few hours I can't quite find an answer so I'm posting this thread. I'm not necessarily looking for code examples. I just want to know if it's possible and where to look next. Basically I'm trying to build a starter application that will help me learn programming. One of the main things I want to do is to be able to dynamically (at run time) create a set of information (data) that can be manipulated via a set of static (and/or dynamic) functions/calculations. The reason I need it to be dynamic is because even though this program is really just for my own fun and perusal on my own machine (and I want it to be able to run without any outside connections (i.e. databases or servers) the data itself is going to be location (i.e.State of residence or even city) specific. Essentially most of the data will be numerical and can be of the integer type. But I'd like to be able to adjust and create new data sets if desired. From everything I've read and researched I haven't found a way to do this (at least now without an excessive amount of coding that is above my expertise). So I want to know if there is a way to do this that is relatively simple.
View 2 Replies
Mar 4, 2011
I needed to create an Access table programmatically an was able to by using Martin Xie's post but how can I set the Field1 - Field Property Index to Yes (No Duplicates)?
[code]...
View 3 Replies
Jan 27, 2009
trying to write a dynamic sql query that fetches data from oracle 10g database. My Where criteria is giving me real problems but i guess it has to do with the oracle data format. The data column is a TIMESTAMP data type storing values like 25-JAN-09 07.06.01.000000000 AM. Am trying to get rows having the columns matching a specific date( ignoring the time values), my where looks like this
WHERE to_date(COMPLY_RUN_DASHBOARD_DATE,'DD-MON-RR')='" & Now.Date & "'"i get the following error :CheckError ORA-01830: date format picture ends before converting entire input string
View 1 Replies
Jan 28, 2010
I want to start learning how to add menus to my vb.net projects. how to code and design them.
View 4 Replies