Create A Layer Between Application And Database?
Aug 12, 2010
What i am looking is how to create a layer between the application and database? I need to create an xml files where the application will fetches the data and updates the data into local cache. Later from the xml files the data has to be transferred to database. Here the application need to work even when the application is in offline and database is not been connected.
View 3 Replies
ADVERTISEMENT
Feb 7, 2011
I am generally following this tutorial, the main differences being I'm using 2008 R2 Express and Windows Forms, he is using 2005 & ASP.NET Web Site:'m building a minimalist Windows Form project for learning purposes. So I'm using a 1-table database with 2 columns, ContactID & Name. I added a dataset file, 'ContactsDataSet.xsd' to my project and added a single minimalist table adapter with just a fill() & getdata() method.Then I added a DataGridView control and connected it to the ContactsDataSet to confirm it was working and that worked fine. I ran it and it filled up with data as expected. Everything up to this point was auto-generated code.
View 4 Replies
Jul 26, 2009
I am trying to prototype an application with a data layer on my computer at home using Visual Basic 2008 express edition with SQL Server Compact 3.5. My production situation at work is SQL Server 2000 and I am using Visual Basic 2005 professional for development.I am trying to write the code to create a seperate data layer. Here is my code. First the data layer:
Imports
System.Data
Imports[code].....
My Problem is that the data does not show up in the text boxes.
View 1 Replies
Nov 30, 2010
I am working in VB.NET defining my own classes. I have 5 classes, Policy, Coverage, CoverageCollection, Layer, and LayerCollection. Policy has a bunch of data items, one of which is of type CoverageCollection. Coverage has a bunch of data items, one of which is of type LayerCollection.
Policy
private id as Long
private name as String[code].....
Then I do like "dim p as Policy". So, iIn order to get to properties on a Layer, I reference it like p.cov(0).lyr(0).face. What I am trying to do is add a readonly property to Layer that is calculated using some Layer information but also using something from Coverage (or even Policy). I can take this in as a parameter to the property, but I think there should be a way to get at Coverage/Policy information since I am "under" it already. Is there a way to do this?
View 1 Replies
Jan 15, 2010
I typically dont create interfaces unless i have to, however in my current application i have to create interfaces in the Data access layer. I'm a in a minor confusion that hwo do i create those interfaces more how to implement them: the following code might make things clear:I have the following class and interface in the data access namespace
[code="vb"]Imports ConsoleApplication8.BusinessLayerImports ConsoleApplication8.DataAccessLayerImports System.DataImports System
Namespace DataAccessLayer
Public Class CountryGateway Implements ICountryGateway
[code]....
1. Is this way implement the interface in the data access layer? (in this case the class CountryGateway access the database.)
2. I have been told that we should create interfaces than abstract classes espcially in the data access layer, is there a particular reason for this?
View 9 Replies
Sep 29, 2011
I am trying to create a report that will give me the area of multiple polygons on a layer. There will be an unknown number of layers and polygons. I was thinking I could use a multidimensional array with each row holding the layer name and the area of that polygon then loop through and separate the layers and sum the areas. My problem is that in all the reading I�ve done on the subject I�m not sure of how to initialize the array.
View 6 Replies
Dec 4, 2009
I am a fairly rookie programmer who is trying to learn the basics of n-layered architecture (DAL, BLL, UI). The application I am programming is a single tier, 3-layer application written in VB.NET (.Net 3.5). Layers as follows:
DAL
BLL
UI
COMMON - contains DTO's right now.
I am having trouble determining what to pass between my BLL and UI. My instinct tells me that I should only pass data to the UI, and not the full business object from the BLL. Consider two scenarios:
1) Pass the BO directly from BLL to UI. This exposes BO methods and allows the UI direct access to the BO, which seems bad.
2) Pass only the pertinent data from the BO to the UI. For instance, a customer has a Name and Address. This data is really what we want to show/edit in the UI, so we would only return that data to the UI instead of the full BO. The UI would then call to the BLL to update a specific BO.
I am inclined to use #2, but I don't know the best way to implement it. The way I have it programmed now, if I only return data from the BLL, all references to my BO's will be lost and the GC will claim them. Based on this, I have some questions:
1) Should I keep business objects alive between calls to the BLL? The alternative is to re-create them every time I pass data through the BLL, which seems wrong.
2) What is the best way to keep a BO alive in a single tier architecture (how to hold a reference if we dont pass it to the UI?)
3) How do n-tier applications do this? Do they keep the BO's alive in the BLL and wait for an update from the UI? Doesn't this require a lot of "book keeping" in the BLL to make sure BO's are released when they are no longer needed?
View 2 Replies
Jun 10, 2011
I'm building a database control layer DLL for my project.HelpDB is the project.HDB is the class name.I've written a few methods for connecting to the db, querying, and the usual.I've recently included a public class HDB_ParamValue in HDB to handle query parameters.
[Code]...
Note 1: I'm moving from VB6, so you'll appreciate that I have little experience with this real OOP. If there is a link or article you can recommend that might answer this, recommend away!Note 2: I'm not concerned about databases and parameters per se, but more the _concept_ of class in a class (or class of a class).
View 5 Replies
Sep 22, 2009
I am trying to clean up my code in a project I have been working on by creating two separate modules one that disables a service and one that enables a service through the registry all of this worked fine in one big form all together but I would like to also reuse the module in some other projects, I am getting this message however "Warning1Function 'ApplicationLayerGatewayDisable' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used". [Code]. what do i need to do to get rid of these warnings ? or do I just ignore them?
View 12 Replies
Mar 4, 2011
I've always used this approach while implementing data layer DLL for web application:
1) put datasets into the dll project
2) use a helper class with a method like this:
public shared sub settCnnStr(strconnhere as string)
My.Settings.Item("connectionString") = strconnhere
end sub
3) when I need to use the dll I call a method like this (usually into global.asax):
xxxxxxx.helper.setCnnStr("yyyyyyyyyyyyyy")
This method always worked for me nicely but I'd like to know if this method could have serious drawback or if there's a better solution.
View 1 Replies
Jan 13, 2009
I am trying to create an application that needs to have a database. I would like to know which one you recommend using. I have programmed in php using mysql but I do not think that is feasible for a windows application. I want something that does not have to install something else with my application.
View 32 Replies
Mar 25, 2009
Every time when application start check for change in structure..
View 1 Replies
Jul 21, 2006
With VB.net, I'm coding a simple application to get more used to the new .Net format.
I'd like to save all the information to a 'new' database file. how to create a database on the fly, once that is done i'll be able to connect to it no problem, but actually creating the file is proving difficult to work/find out.
Also, with vb.net and the newly created custom file, how can it be made to automatically open that information with the program?
Is there a method in installation to associate the file type with the new program? How can i check when the program loads if a database file has been 'double-clicked' (rather than just running from the .exe of the program) and proceed to load the data?
EDIT1 - Extra InfoThe windows application has many different fields and content etc, then i need to save that to a file that could later be loaded by 'double clicking'. I assumed the easiest way would be to create a mini-database for each unique file
View 3 Replies
Jun 2, 2010
I'm Using Visual Studio 2005 and Mysql Database to create a windows application. The datagrid displays all the records. Since I don't know how to directly update from datagrid, thats why I have used textboxes for the respective datagrid fields. A load button is provided which on clicking puts the data on the respective textboxes. The data can be edited in the textbox. Problem is that I can't save this edited or modified data back into dattabase.
[Code]...
View 1 Replies
Aug 2, 2010
I am trying to create a database application that will keep records of all cash transactions. how to print a cash receipt to give it to the customer?
View 2 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 12, 2012
I am trying to create an application that adds the contents of a till to a database. (Does this on two forms into two different sets of db columns) and can pull that back up at a later stage. At the moment, I'm stuck at the first section?
BODda.Update(BODds, "Data")
Is where I get an SQL error stating:Syntax error in INSERT INTO statement.I have not been able to find a way to insert via SQL?
View 3 Replies
Feb 2, 2010
i've got a free mysql database online hosted by 000webhost, i'm just wondering if i could connect to the mysql database, and if so what would the connectionstring be like? when i connect using php its something like this: new mysqli("mysql13.000webhost.com", "user", "password", "database1"), how do i translate this into a vb connection string, i can't decide what to put as the data source [code]if there's no way to connect, is there anyway for me to create an application that can store and access database online?
View 7 Replies
Jul 2, 2011
I trying to create an application using vb 2010.This application handles booking of airline customers. i am using ms access 2007 where i have created a table that stores customer information and another that stores and updates seats available in different flying classes. Am trying to develop an interactive application in visual basic 2010 where customers can book. i want to add this data to the database in real time and communicate to customers the seats available,prices and so forth. In otherwards the application communicates with database and updates accordingly. Firstly how do i connect to my database? I tried ADO.net but seems better equiped to work with sql server which i have no idea how to use. Is there a tool that can make my interaction with the access seamless
View 1 Replies
Jan 9, 2009
I'm creating an application in which i have 5 picture boxes on top of each other that will "layer" pictures on top of each other. The user can show and hide certain layers by checking / unchecking check boxes. I need all the layers to be transparent so the prior layer can show through. Currently all layers are set to transparent back color however, in VB8, controls by default don't support transparent colors. MSDN says you can override this and give controls transparency by the following:
Locate the constructor for your control class. The constructor appears in the control's code file. In C#, the constructor is the method with the same name as the control and with no return value. In Visual Basic, the constructor is the method named New. Call the SetStyle method of your form in the constructor.
View 8 Replies
Nov 2, 2011
We would like to create a client-server architecture application that the server can control all client computers connected to it (e.g shutdown) and we would like to put a security login and a desktop lockeron the clients. The process of the system is that when the clients starts, the desktop is locked and ofcourse the user can't access the desktop unless he/she logged-in. And when the scheduled time (e.g 1 hour) is done, the client computers where automatically shutdown like the Time Logger Softwares
View 2 Replies
Mar 2, 2010
create a database application, which integrates search and sort, with the use of notepad.
View 5 Replies
Aug 1, 2010
I am trying to create an application where it stores images as well as data.
View 3 Replies
Apr 24, 2010
i have a simple application which can create/update/delete/search records using Access database. If i add a record, save it, then close the application and run it again and search for that record, it appears. However, when i write some code to my application, nothing to do with the search function, and i run the application the record is not found. For example i added a button to clear the textfields, and when i ran the application the records i have added earlier were not found.
View 1 Replies
Feb 24, 2011
Ok, so I was playing around with Ninject, a "Service Layer" and a "Repository Layer".I built a simple console application to to play around, this is what I came up with:
Imports Ninject
Module Module1
Sub Main()
Dim Kernel As IKernel = New StandardKernel(New CustomerModule)
Dim Service = Kernel.Get(Of CustomerService)()
Console.WriteLine(Service.GetCustomerByID(1).Name)
Console.Read()
[Code]...
View 2 Replies
Sep 25, 2009
I am using VB 2008 Express and have created an application that connects to a SQL database to populate a datagrid.The application is working properly on my computer but will not on others 'remote connection permissions' error.After some googleing I found that the express version is crippled to only work on local machines that use a database.If I purchase Visual Studio 2008 Standard Edition, import and rebuild my application, will my application be able to run properly on other PC's?
View 7 Replies
Oct 9, 2009
does VBasic allow a MS Access Database DataSet create a Stored Procedure or will it only allow SQL Database DataSet create SP...
View 4 Replies
Aug 4, 2010
Hello I want to create a windows form application program that can create games something like Gamemaker or Klik & Play (butt less advanced) with D&D "Drag and Drop" events and actions.
View 7 Replies
Sep 22, 2009
I am having two databases for the same application , one in windows and the other is web based.Since web based one have few functionalities I can't opt for a single database.At the same time I want to share Both databases to be updated with other's data so as to work error free with my module of appointment fixing.
View 2 Replies
Feb 26, 2010
How can I create a VB application in VS2008 without requiring the application be run on a computer with a .NET framework in place?
View 4 Replies