How To Handle Database Changes

Jan 27, 2010

I have several installations of my Linq-to-Sql app running in the field. Now I've created a new version, which adds a new column to a certain table. I've added this column in the dbml file. But when updating the installation, I want to preserve the existing database. How to handle this? Linq-to-SQL doesn't seem to like this inconsistency.Is there an easy way to update the existing database using my new dbml file?

View 1 Replies


ADVERTISEMENT

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

VS 2008 Handle The Updates To The Database?

Oct 1, 2010

what's the best way to handle the updates to the database.For example i have one datagridview that's binded to a datatable (with two fields, id auto incremented and a varchar). The user can do all the operations Insert, Update, Delete.If i insert one row (only the text) and call the update method to save the changes to the database, and after that remove the same row and call the update method the adapter will throw a exception because it didn't update the datatable with the value of the id. So the best way to do this is always calling the fill method after every update?

View 22 Replies

Handle 2 Different Versions(free, Pro) Database Requirement?

Jul 15, 2009

I am planning to write an application which will be available in 2 versions. one free and the other one paid. The only difference is that in free versions only a maximum of 2 DB entries are allowed. but its unlimited in paid version

View 3 Replies

Handle Return Value Of Sql Query And Store In Database?

Aug 22, 2010

How to handle the return value of the sql query and store in the database?

View 1 Replies

How To Handle 2 Different Versions (free / Pro) Database Requirement

Aug 10, 2009

I am planning to write an application which will be available in 2 versions. one free and the other one paid.The only difference is that in free versions only a maximum of 2 DB entries are allowed. but its unlimited in paid version.DB does not have more than 1 table with 5/6 fields.I am planning to use xml for free version and SQLite for paid version. Is this ok? are there any other options?

View 1 Replies

How To Handle Users From Sql Server And Connect Database

May 29, 2009

using the sql server management studio we can create users to access the database. so we can grant several privileges as well as revoke some. so i want to create a login form with those user's. how to do it. is there any other way [code] in the connection i have to mention the user also.. is it possible. if its possible.

View 1 Replies

Most Efficient Way To Handle Continual Database Access

Mar 6, 2009

Whats the best way to handle the connection to a db when it's accessed often? I have an app where the user selects an item from a drop down list(call to the db) and then a picture of the item is returned along with it's relevant information(another call to the db). Small application but basically every action results in a call to the database. Should i just be filling like a global dataset and then accessing the information from there(if thats possible)? The database is stored locally(currently an Access Db but will be SQL in the future)

View 3 Replies

Parse Value From Database Datareader And Handle Possible NULL Value?

Feb 16, 2011

I have run into this problem a few times and have never come up with a good answer. I figure others must have dealt with this already.I have a datareader returned from the database and I want to use the values therein however values may or may not contain NULL. I would like to have a unction that takes in the value from the datareader and returns the value if it is not NULL and blank space if it is NULL.The problem I have is that the data-type of the variable I am testing is variable. It can be a String, and Integer or a DateTime. Can anyone suggest a simple way to test the value and then return the original value (as same data-type if possible) or something else if it is NULL

View 5 Replies

VS 2010 Handle Null Dates In A Database?

Apr 18, 2011

I am reading dates from a table in a database to display in a DataGridView column that is formatted as a date. The problem is that when the value is null in the database my program errors out because it cant convert the value to a date. How do you guys handle this? *Edit: If I set the value of my date variable to "Nothing" it displays as "1/1/0001" in my DataGridView, and I would like the cell to be empty for the null dates.

View 24 Replies

Handle DBNull Exception While Reading Data From Database?

Mar 22, 2012

I'm trying to handle DBNull exception while reading data from database. It's my code:

...
Dim SQLRDAs SqlDataReader
...
val1= GetStringFromDB(Trim(SQLRD("Name")))
val2= GetStringFromDB(Trim(SQLRD("Level")))

[Code]...

But still I get Conversion from type 'DBNull' to type 'String' is not valid. error.

View 4 Replies

Joystick Handle - Use Only The Handle Of The Component?

Mar 23, 2009

I wrote an application to handle a joystick with directinput. It works fine if it uses the handle of the main window but it doesnt happen the same if the handle is the one of the component that contains the joystick's operation.

I mean:

main form handle: 15

component handle (which is inside the window and the joystick needs the focus of this component to work): 25

It always work if the handle i initilizate the device is the main form (15).How can i use only the handle of the component?

View 1 Replies

Concurrency Handle Is Part Of The Software Developer Or Database Developer?

Jul 23, 2009

In CRUD application development we have to face the issues with concurencies in Ids such as Generate and display UNique EmployeeIDs on forms. Currently i'm writting .DLL file that has a class that will handle concurrencies.

But i'm puzziled with the Question, is this concurrency handle is part of the software developer or Database developer?

View 9 Replies

Asp.net - Getting .NET To Handle CSS Files?

Jul 25, 2011

Possible Duplicate: Can .NET intercept and change css files?

I have configured IIS6 to get .NET to handle css files.I did the following steps

Launch IIS Manager Right-click on Default Web Site Click on the Home Directory tab Under Application Settings click on Configuration.Add a new association for .css and map it to .NET executable:

C:WINDOWSMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll

How can I check if this is working, i.e. I want to change the default style of a page depending on the url, i.e. if the referer url is http://intranet, it should continue to use the old existing style style1.css, if the referer url is http://intranetv2, it should use the new style style2.css.

View 2 Replies

Can't Get A Handle On The Syntax?

Aug 6, 2009

I can't get a handle on the syntax. Can anyone give me a simple demo?

View 3 Replies

Get A Handle On The Correct Way?

Jul 2, 2009

I am trying to get a handle on the correct way and easiest way to do things. By easiest I am not talking about being lazy just accessing and modifying later on. I have started using my own classes and such but I have a few questions. Sometimes I want to create a control on the fly through code instead of using the designer. Should I create this control in the main form file or in a separate class? If I make it in another class it seems harder to access later on. Then again if I dont know that the control is going to be created(user clicks a button to add a control) how can I access it? Also it seems alot harder to access certain things when it is in another class. For example if I create a new window in a class and then want to check if it is there or not it is alot harder to do.

View 5 Replies

Get Handle Of A Combobox By API?

Feb 13, 2012

Are there anyone know how to get the handle of a standard Combobox using API?

View 3 Replies

Get Handle Of NotifyIcon?

Dec 13, 2011

How do i get the handle of a NotifyIcon?

View 4 Replies

Get The Handle From A Control?

May 8, 2009

I need the intPtr for a form. Control.FromHandle(control) gives me the control from a handle, but I need the opposite--get the handle from a control. How do I do this?

View 2 Replies

Get The Handle Of A Control?

Apr 27, 2009

I need to get the handle of a control as an IntPtr to pass to a screen capture class in vb.Net 3.0. Tried this but get an invalid handle exception.

Dim hwnd As IntPtr = Runtime.InteropServices.GCHandle.Alloc(CanvasMap)

View 2 Replies

Getting Handle Using Win32 Api?

Jan 24, 2012

I am trying to create a small utility that tracks desktop usage in detail, to the level of individual text boxes etc.... in other applications. However, it is proving quite tricky. I thought I had it nailed using the Windows api. The below code is just a snipet of the code but essentially it provides me the handle of the control that the mouse is over. I thought from here, it would be easy to to the same thing but to provide the handle of the control that the cursor was actually clicked on, for example, if someone is filling in a text box in an application, they would not necessarily move the mouse to get to the text box, they may tab to it. Does anyone know if there is a way to get the handle of the control that is in use?

Private Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
Dim ptx As Integer = Cursor.Position.X
Dim pty As Integer = Cursor.Position.Y

[code]....

View 4 Replies

Getting The Handle Of Another Application?

Apr 12, 2011

I need to get the handle of a window with a specific name from my vb.net application. The form isn't actually from my application.

View 1 Replies

Getting The ProcessID From Handle?

Jun 23, 2009

I am going mad about getting the process id for one existing handle on VB2008.I tried both GetWindowThreadProcessId(hwnd, pid) and GetProcessId(hwnd), while PID always returns 0, I tried the same things in VBA of Excel, it works perfect, so this is somewhat weird,

View 8 Replies

Handle A Event From DLL ?

Jun 22, 2010

I have referred DLL in my project. I have to handle the event from DLL in VB.net code. I guess we can do using WithEvents. Can you give me complete picture?

View 2 Replies

Handle Results Of More Than 1 Row

May 6, 2009

I am having a SP run in my VB application every 10 seconds to check for any new rows that have been inserted to the database since the last check. What is the best way to do this? Most likely it will be 0 or 1 rows, but I am afraid at random times it maybe more than 1 and so I thought I would fill it in a DataSet, but I came in here to see if there are any other better ways. If dataset is the best way, how do I do a For Each Row in the dataset to process some VB code for each row?

View 20 Replies

Handle SQL Null In .NET?

Jan 19, 2009

I read stuff from a SQL DB (database) using a data set. Some of the columns in the DB may contain NULL. I want to go through the table in the dataset and print, or use in some other way, the data. But when I try to use a certain data that corresponds to a NULL in the DB my program crashes.How can I detect - in the dataset - that it has no value and that I shouldn't try to use it?

Private Sub Get�rendenLista(ByVal e As System.EventArgs)
'----------------------------------------------------------------------
' This function fetches a list of �rende from the table �rende
'----------------------------------------------------------------------
Dim cno As New SqlConnection

[code]....

View 6 Replies

How Does One Handle Handles

Sep 12, 2009

The short program below runs just fine when it is the only item on a form. However, when I put it into the ItemInsertTemplate of a ListView control, I get the following message:

Handles clause requires a WithEvents variable defined in the containing type or one of its base types

Line 30: Protected Sub btnDate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDate.Click

The error message identifies Line 30 as the problem.I get the same message for Sub clnEvent_SelectionChanged How do I correct this?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="clnControl.aspx.vb" Inherits="clnControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

[code].....

View 2 Replies

How To Get A Handle To A Printer

Nov 22, 2009

Does anybody know if there is an API function that would let me cancel a print job.I already know how to get a handle to a printer and how to enumerate the print jobs using the printer handle.

View 1 Replies

How To Handle Associated Files

Feb 25, 2009

how to make VB handle my associated files.I made a program that opens fine when from the EXE file. But however, when I try to open it from the associated file, it behaves the same way as if opened from the EXE.So, where (in what method?) do I tell VB how to handle those files?

View 8 Replies

How To Handle Db Nulls

Oct 11, 2010

I am retrieving a database object and trying to set the values of the object's fields to various textboxes in my vb.net page

View 3 Replies







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