SQL - Store Enums At Database Level Or In Application Logic?

Jan 19, 2010

I have a table, lets call it Objects. It has a predefined set of records looking like this:
ObjectId ObjectName
1 Salmon
2 Trout
3 Seabass
4 Shark
Etc..

So, this I would like to implement somehow as an enum. But what's the best way, implement it in the database creating tables for it or in the application logic in an CommonEnums codebehind file etc?

View 2 Replies


ADVERTISEMENT

Store A Value Globally (Application Level)?

Jul 10, 2009

I need to store a value globally (application level). This is part ID retreval program, procedure will return teh Max ID number thena i need to store the retreved value gloablly, so that if the user open many intance of teh same form i can use the gloabl value, to send Unique ID numbers to each form.

View 4 Replies

Application-level KeyUp/KeyDown Events (not Windows Form-level)?

Apr 1, 2012

I am creating an Excel add-in written in VB.NET. I would like to bind KeyDown and KeyUp events to the spreadsheet to record when the user presses and releases the arrow keys while navigating the spreadsheetIdeally, these events would be built into Excel alongside the native SheetActivate and SheetSelectionChange events, for example. Alas, they are not.

View 1 Replies

Create An Application That Can Store And Access Database Online?

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

Store A Stream In Compression Level 4 Jpeg Format?

Jan 10, 2012

some link or could that could explain the way it could be done.

View 1 Replies

.net - Handling Different DbType Enums In Database-Agnostic Architecture?

Apr 17, 2012

Here's my current set-up:

Public Interface IDatabase
Function CreateParameter(name as String, dbType as <dbTypeEnumeration>)
End Interface

[Code]....

The problem here is what exactly is dbTypeEnumeration. In the example above, it's simply a placeholder to what my problem is. Since we use both Oracle and SQL Server databases, the DbTypes are different depending on the database being used. For Oracle, the OracleClient object has its own OracleDbType enumeration with types. SQL Server also has its own enumeration.

My question is: is it possible to show those database-specific enumerations depending on which repository is injected into the DatabaseService constructor? If not, what's the best way to go about this? I want to separate the two databases, share logic, and allow for future development, ala the interface as a code contract for that development.

View 2 Replies

Enums Error In Vb, How Is It Different From Enums In C#

Aug 3, 2011

I thought that enums in VB and C# where the same or at least very similar. Then today I stumbled across a bug in our VB code. The following VB code compiles and runs with no issues:

Enum Cars
Subaru
Volvo
End Enum

[code]....

Why does the VB version not catch the type mismatch? Are enum in VB and C# different?

View 2 Replies

Logic Check Database ?

May 2, 2010

How can i write logic to check is it my sql statement being insert into my database ? is there any ways to create or thing can check thru by using webservice?

View 13 Replies

Asp.net - Separation Of ASpx Pages On One M/c And Application Logic On Another M/c?

Sep 30, 2009

We are using VB.NET and ASPx for our project. we would like to separate the aspx pages and put them on the IIS server (web server) on one m/c and the business logic and DAL layer on another IIS server (application server) on a different m/c .The database is on another m/c. Is such a configuration possible ? If so how can it be implemented?

View 2 Replies

Include Logic In Application To Handle Concurrency Violation?

Nov 5, 2008

the problem here happends every time i tried to change a record that's been allready saved.Private Sub PropuestasBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PropuestasBindingNavigatorSaveItem.Click

[Code]...

View 8 Replies

Database Logic - Differences Between Datasets And Datatables ?

Jan 12, 2009

My understanding of databases (access and sql) is fairly limited, though i have got a couple of programs under my belt using access databases, not yet used SQL. I could however, work around to figure out a way to do what i'm trying. What i don't understand is the need for all of the components, so all i'm after is somebody who can take the time to fully explain these further to me, or point me in the direction of somewhere i can gather a full understanding.

My questions are, for now;

1. Why do we need to take a copy of the database, rather than dealing exactly with the database itself?

2. What differences are there between datasets and datatables, what is better for what and why?

3. What is the purpose of the data adapter?

View 3 Replies

Gradually Transition To NHibernate Persistence Logic From Existing ADO.NET Persistence Logic?

Sep 3, 2010

The application uses ADO.NET to invoke sprocs for nearly every database operation. Some of these sprocs also contain a fair amount of domain logic. The data access logic for each domain entity resides in the domain class itself. ie, there is no decoupling between domain logic and data access logic. I'm looking to accomplish the following:

[Code]...

View 2 Replies

Application Referencing Lower Level Dll's?

Apr 6, 2011

If I have a low level dll called low.dll. I then create another dll, say my.dll that references low.dll.

Now, if I create an application that references my.dll, I should not have to reference low.dll in the application correct?? This does not seem to be happening. The application will not compile as it cannot see low.dll, even though it does not access it directly.

View 8 Replies

Edit Application Level Settings?

Oct 26, 2009

How do you change an application level settings after compiling? I've searched Google and am at a loss. I've tried modifying the APPNAME.config file in the deployment directory but it doesn't change the application level settings.

View 3 Replies

Handle .net Exceptions At Application Level

Apr 2, 2009

I was reading a couple of articles a while back which I think described a behaviour where you can, in a .net application (specifically VB.net), allow an exception to occur, and then handle it in some kind of application-level exception handler, as opposed to within a Try/Catch block. My google-fu is weak at the moment, so I'm not having much luck guessing what this feature is called in order to find information about it.

[Code]...

View 5 Replies

.net - Store Application And User Settings Of An Application Running With Multiple Instances?

Jul 12, 2011

Which is the best way to store application and user settings of an application running with multiple instances?My problem is that using the vb's "Application Settings" one instance would overwrite the other one.I want to identify each instance with a number passed via command line argument. I could use this number to identify the appropriate settings of the running instance, but I see in a local INI o XML file a better way to handle that.

View 1 Replies

Application Level Settings With Read And Write?

Jul 13, 2011

I bet someone already asked this but i cant seem to find it. Ok i need is a global settings that can be updated which will affect all users. I was using xml files in the program filestill now and I need to get around using this because the files can be delete or over written incorrectly. I started using the settings option and realized application level is read only and i cannot use user scope because then it wont be global settings. Is there an alternative to this.

View 5 Replies

Build An Application For Which Need To Set Low-level Keyboard Hooks

Jun 28, 2010

I have been trying to build an application for which I need to set low-level keyboard hooks. I thing I am trying to accomplish is that when I press the key "a" I want windows to think I have pressed the key "b". But the problem I am facing is that when I press key "a" it produces "ab". I am providing my code below.Also I would like to know how to detect double and triple key presses (e.g. shift + a and ctrl + alt + b). [code]

View 2 Replies

Comparison Level How Does .NET Stack Up Against Delphi For Web Application?

Feb 8, 2011

I was surfing the next to get some of the powerful elements that .NET has over other langauges when it comes to VB.NET and I was told to learn delphi.

Since this is a VB.NET forum I was hoping you guys could tell me why I should stick with VB.NET over a language like delphi.

View 6 Replies

Create Application-Level Mouse Events?

Aug 16, 2011

I have a program that I would like to create application-level MouseEnter and MouseLeave events for. Basically I have an app that I'd like to leave open that would be very opaque when not in use, and when the user moves the mouse anywhere within the bounds of the application, it becomes solid, and when they move their mouse away from the application, it becomes opaque again.

The obvious problem is that MouseEnter and MouseLeave are control-specific and so they fire every time you move over a button or menu or whatever, so Leave and Enter are constantly firing even though you haven't "left" or "entered" the application.

So, is there any way to create mouse events that only fire at the application level?

View 12 Replies

VS 2008 Application.StartupPath(), Back/up A Level Into Another?

Jul 5, 2010

been banging my head on this, i need to get the applications path, then go up 1 folder then into another. As i have a main app and sub apps.

So were Application.StartupPath()is for example:"C: Main app folderSub app folder"How do i then go up a folder to"C: Main app folder"I Know it needs some string removal using on it but i can seem to get it right, after which i could then use Application.StartupPath() 'string removal here" & " ools"to navigate to another sub apps folder etc.

View 8 Replies

Add Application Level Error Handler In Program Win Forms?

Sep 21, 2010

How to add application level error handler in vb.net win forms

View 1 Replies

InputBox Function - Program - Allow User To Input 5 Payrolls For Store 1, Store 2, And Store 3

Mar 22, 2012

I am coding a program that will allow the user to input 5 payrolls for Store 1, Store 2, and Store 3. The total of the 5 payrolls are then added together and shown in the respective Store's labels. A total label is also there to add up all the totals into one number. The numbers in the label must be in currency form. My problem is the numbers don't add correctly when I hit calculate. The first two numbers add together, but then after that the number just seems to subtract a random amount.

So far I have this --

Public Class Form1

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

[CODE[...

View 14 Replies

Create Own System Date In .net Or Database Level?

Apr 10, 2011

i don't want to use the system date and time in my mini project.i want to create my own system date and time to be in sync with standard time i specify?

View 3 Replies

What's The Difference Between Dim On The Member Level And Static On The Procedure Level

Jan 6, 2010

In Visual Basic 2008, there's two different ways that I know of to accomplish the same thing:The Dim on the member level:

Dim counter1 as integer = 0
Dim counter2 as integer = 180
Public Sub SampleSub1()

[code].....

View 1 Replies

Asp.net - It Is An Error To Use A Section Registered As AllowDefinition='MachineToApplication' Beyond Application Level

Dec 14, 2011

[Code]....

I have hosted a website in a server using ASP.Net 2.0, i have a web.config in the root folder and also one in the Admin folder, but the admin folder is not a virtual directory and i dont want to create.

[Code]....

View 2 Replies

Get Informations From A Database To Manage The User Access Level?

Sep 3, 2008

I'm writing a form that get some informations from a database to manage the User Access Level.The way i do that is to Fill a Dataset by using a DataAdapter and the Bind some controls to the Dataset.The controls i binding are a ListBox, a Textbox, and five Checkboxes.All are fine with this controls. I can delete values and update values, i can choose a record from my ListBox and the values of this record to be desplayed on the othrer binded controls and so on.

[Code]...

View 1 Replies

Perform Grouping Of Resultsets In Code, Not On Database Level?

Apr 12, 2010

Stackoverflowers,I have a resultset from a SQL query in the form of:

Category Column2 Column3
A 2 3.50
A 3 2

[code].....

View 4 Replies

Top Level SQL Table Row - Save The Top Level Automatically?

Mar 18, 2011

I have created a simple program which uses a two tier structure of SQL Tables.At the top level, one record holds the date of the activities and linked to it using its primary key as a foreign key, three subordinate tables hold time stamped records.The issue I have been unable to solve is that before adding any of the lower level records for a given date, a newly added top level record must be saved to the database.Doing this manually is simple - but can I rely on my users to remember to do this before they start plugging in the lower level data?I thought not, so I am looking to save the top level automatically.I've failed miserably but I refuse to believe that it's not possible.

View 14 Replies

Error - Server: Msg 5171, Level 16, State 1, Line 1Database.mdf Is Not A Primary Database File

Aug 5, 2009

I have the error Server: Msg 5171, Level 16, State 1, Line 1Database.mdf is not a primary database file.

View 1 Replies







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