Multithreading With Databases?

Aug 22, 2010

I have read many articles on multithreading over the past few days and so far I'm fairly comfortable with how it works. I am now working on my actual application, and have come across a few design issues that I'm hoping somebody has experience with.The basic premise of the application is simple. A database filled with files names and a "converted" field that has a 1 or a 2 in it (1 for unconverted, 2 for converted). The application loops through every record where "converted" = 1, retrieve the file and convert it.

My single threaded application works fine, except its far too slow. Due to the huge amount of rows in the database (4 million+) and the time constraints on the project, I have decided to run as many threads as the hardware can allow to cut down on the timings.So, the dilemma is accessing database records and which threads should grab which record and how.

View 3 Replies


ADVERTISEMENT

How To Do Databases Using DAO

Apr 2, 2012

i've been doing ADO.NET for a while but I would like to know if its posssible to use dao recordsets in VB.Net 2010 and where I can get tutorials and code samples to do database stuff like insert etc. I've tried to google but most of the code available is for vb6 I was going through some stuff on this link [URL]../bb243801%28v=office.12%29.aspx and i'd like to know if it works for vb.net 2010 or maybe theres something i'm missing. because the moment I put "Dim dbmyDB As dao.database" its been giving me the wavy blue line and i am now doubting if it works or maybe i'm missing some other code

View 1 Replies

SQL Databases In .net?

Sep 9, 2009

If you are using an sql database with a vb.net application, does the user need to have anything extra other than the .net framework installed for the program to run? Meaning, if I simply compile the application, are there any extra steps I need to take to make this work?

View 1 Replies

How To Do Multithreading

Jan 18, 2010

What is multithreading and how do i do it in vb.net?

View 2 Replies

Better Security For Databases?

Feb 20, 2011

Ok, so I am on my last book of course material for college and this weekend I started making my own personal applications, stuff I can really use in everyday life, these projects also serve as a port folio for future employers

View 1 Replies

Can't Get Databases To Work

Mar 14, 2010

I recently moved over to a Windows 7 computer and I can't get databases to work with VB.net.Before I moved I used to do an Access database and connect it to VB through the ODBC thing. However, I don't have Access on this computer (open office) so I'm not sure how to create a database and connect it.I have tried to use the SQL Compact Edition that comes with Visual Studio but I not sure how to get it to work. Also would something like mySQL work with VB? I have looked at the mySQL workbench and like it, what else would I need to download to be able to use the databases created with it in Visual Studio?

View 2 Replies

Comparing Two Databases?

Dec 14, 2010

I am trying to carry out a synchronisation of two databases: one on the server and the other on a local machine. So that even when they are not connected on the network, the local database can carry on accepting data but when the network is back on, the local database can update the server and the server can also update the local machine with data it accepted during the time when the network was off. by first comparing two tables in two databases and then if they are any differences the updating begins and i've since been stuck.

Private Sub btnCompareTables_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCompareTables.Click
'dont know which arguments to put when calling this function
'How do i tell the computer which databases to compare
Comparing()

[code]....

View 1 Replies

Get Relation Between 2 Databases?

Jun 7, 2011

I have two dataset , each with with table . each datasets is connected to a separate dataadapter to get data from sql server database file (two different tables SQLtableOrders & SQLtableCustomerA))

datasetOrders.Tables("Orders") >>> the first column "orderID" is a primary unique key. Its structure is details below :
OrderID----OrderName----OrderCost--------Date
1----------A---------------54------------11/11/2010

[Code].....

note that I had already made this by getting the data by SQL Statement "Select SQLtableOrders.* , SQLtableCustomerA.orderID FROM SQLtableOrders, SQLtableCustomerA WHERE SQLtableOrders.orderID = SQLtableCustomerA.orderID" It is really working fine , but the problem that it takes time to get data from the SQL server each time I disply orders. I already have the datasetOrders.Tables("Orders") data on the client PC , I need only to make the client PC extract which orders are assinged to a ceratin customers. I can do it by For... Next , but I guess it will take time , specially if "orders" data contains many data .

View 8 Replies

Get Started With VB Databases?

Feb 5, 2010

What control(s) do I need to use and how do I use them? I am ,looking for tutorials and sample code too.

I'm working on a trivia game where the admin can remove and add questions to a database. [code]...

View 2 Replies

How To Work With Databases In Vb

Apr 21, 2012

I am fairly new to programming, and even more new to using database objects. I am creating a program that will calculate a user's BMI, and that will let the user know how many calories are in a food that they choose. I found a database that has a bunch of foods, and each of their calories, so I am using that. I have the program set up so that the user selects each food from a drop down list. The user then adds each of the food to a list box after pressing a button. The program is then suppose to calculate all of the calories after the user presses another button to come up with the total calories. I got all the foods on the drop down list no problem, but now, I'm stuck on figuring out how to get the program to add all the calories for each cooresponding food. I have no idea where to start with it. I know that I'm going to have to create a variable to hold the total calories, but I just don't know how to get the calories from each food.

View 8 Replies

Local Databases In .Net

Feb 22, 2010

I am looking to add a local database file (.sdf) into my .Net Project, so i go right click on my project, click "Add" -> "New Item", select "Local Database" and rename it to what i want.I then click the "Add" button and get the following error."The data provider required to connect to the local data file could not be found. The file will be added to the project but the typed DataSet assosciated with the file will not be generated."I am using Visual Studio 2008 .Net Framework 3.5.

View 4 Replies

Options For Databases ?

Apr 29, 2010

Well my project will basically involve a database of the sports info of students in my school. It has to work with about 1000 profiles, each containing a personal info record (basically an address book) and a Sports Info record which has some simple information like what sport they do for winter and summer but it also has some records like "Training Info" which will contain a some 10 fields. It'll wind up something like an array of records of records of records.

One of the key points for assessment is that we employ search and sort functionality explicitly using algorithms that have been provided to us. Essentially we'll have to write up our own subs for binary searches and stuff like that.

Now this is group work and I was put in charge of making the database, one thing I'm unsure of is what I should use. Most of the other groups are using .txt files to store their databases as they've been told that these are easier than Access files. However their databases don't appear to be quite as complex as the one my group's planning. Another random titbit of info I heard was that using our own search functions to search an Access file would not only be slower than using the inbuilt ones (another random something gleaned from conversation) [does it have inbuilt search functions?? I heard somewhere else it didn't] but also that it'd be slower than searching a .txt file with a similar sub.

I'm not sure of the veracity of those statements, however I still want to ask if you guys have any recommendations for what I should use to make the database with. The only ones I know of are CSV text files and MS Access, I'd be very grateful if you could point me in the of a good "thing" to use with VB.net for this kind of project.

View 2 Replies

Using MS-Access Databases In .net?

Jun 14, 2012

I'm trying to get going with using MS-Access databases in vb.net. In my case, I have a list of MS-Access database paths as strings that I want to talk to. I don't want to add the databases permanently to my project, since there are many of them (hundreds, actually). To start off, I have something like this:

Public Sub main()
Dim conn As New OleDbConnection
conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _

[code]....

If I run this, it fails at " Dim rdr = cmd.ExecuteReader", with the error:

"Record(s) cannot be read; no read permission on 'MSysObjects'."

however, I can open the same database using the MS-Access client and run the same query without a problem.

View 4 Replies

VS 2010 How To Use Databases

Jul 8, 2009

I need to know of is a good tutorial or site of using databases...Mostly the basic functions like...

*importing it into visual basic
*reading
*writing
*updating

I have a good knowledge of visual basic and want to learn how to use the databases.

View 1 Replies

Asp.net - Use Of Multithreading In Web Apps

Dec 17, 2011

I am using an Application server for calling Oracle Reports and I have a URL to call the report. When the report is called the server converts it into PDF but when report contains large data it takes a lot of time to load. I want to do in asp.net that when I call the report url it opens the PDF file and copies it into the root of my web folder. The next time when I call the URL it opens the PDF file and creates a new PDF on backend for next call. I have made this function to download file

[Code]....

View 2 Replies

C# - MultiThreading And Deadlock?

Mar 28, 2009

In which situations we can do the multithreading and deadlock concepts. can give some examples

View 4 Replies

Multithreading A For Loop?

Feb 27, 2011

Basically I am making a proxy testing program. A user can supply a list of proxies to test. What i want to be able to do is have them be able to specify how many threads they want to run. Then have the program go through the list testing each one using the amount of threads supplied. Really not sure even where to start on this. Threadpooling?

View 3 Replies

Multithreading And Commons?

Dec 21, 2011

What does common data or data that's in a common, look and is treated by multithreading? I'm quite aware that acess to such data would have to be synchronized, but beyond that is it acessible?

"MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

View 15 Replies

Multithreading In A Class

Apr 13, 2009

I have a class with a background worker in it that does some tasks on a separate thread. I want to fire some events from the background worker thread to the 'main thread' of the class, so that when using this class your not obliged to go make invoke calls for every event handler your using.I'm at a loss of how to do this though. When having a similar problem in a form of usercontrol I always use Me.Invoke, but this method is not present in a class inheriting system.object.

View 1 Replies

Multithreading With A Timer?

Mar 1, 2011

I have a screen that checks for alerts every 30 seconds by looking up outstanding issues from a database.When there is an alert, an audio file is played depending on the alert.It takes 1-2 seconds to grab this audio file which caused an issue with global screen freezing, so I added multithreading where it plays the sound file. This seemed to work fine.However I am new to multithreading and am not sure if I'm working with it efficiently..I have simply declared the sound-playing function as a thread at the top:[code]I am unsure if starting and aborting the thread is the right way to do it. However if I suspend or make the thread sleep I would have to determine whether it has been run before.

View 18 Replies

Multithreading With Same Procedures?

Nov 23, 2011

I have a function in my program that adjust sales for multiple days. Sometimes it needs to adjust up to 3 months and the tasks takes a while so I decided to split up the work between multiple threads. The way I have it working is say I need to adjust 3 months. I have the first thread adjust sales for the 1st month, the second thread adjust sales for the 2nd month and finally a third thread that will adjust sales for the 3rd month. Since all three threads are performing the same tasks except for different date range they use the same procedures. Within those procedures I make a call to the database to extract the sales for the given month. At some point it seems like the threads start to use the same SQL Data Objects because I am receiving the below error."There is already an open DataReader associated with this Command which must be closed first."Below is the first procedure that is ran by each thread up to the line where it errors out.

Private Sub Process_Adjustments(ByRef objAdjustBillCodeThreadParameters As clsAdjustBillCodeThreadParameters)
Dim cmd As SqlClient.SqlCommand

[code]....

So all three threads call this subroutine and the first thread does the data fill with no issues and then sometimes even the second thread does the data fill with no issue but then the third thread crashes and produces the above error. It seems as though the threads are sharing the same SQL Objects when all objects are local to the sub and I always thought each thread had it's own memory to work with. So I thought each thread would call the sub create it's own objects in memory, but that does not seem like what it's doing. I have other multithreading processes in my application that work perfectly fine, this is the first time I am attempting to multithread in this manner where I am using the same procedure within multiple threads.

Just thought of something that I might be doing wrong. The subroutine in question is in the same class where the threads are created. Should the subroutine be in it's own class, and therefore each instantiation of that class?

View 3 Replies

Use Multithreading With VB 2005?

Nov 13, 2009

I try to use Multithreading with VB 2005. I added a Listbox to main form and i tried to fill ListBox with 2 threads. When i executed code it told me that this is unsafety operation becasuse of ListBox is created with Main(Form1) form.

Is there anybody who has such simple multithreading example with Mutex or such lock mechanism?

View 1 Replies

VS 2008 - Right Way Of Multithreading ?

Jun 8, 2010

what is the right way of Multithreading in visual studio 2008.

View 1 Replies

VS 2008 MultiThreading In .net?

Aug 10, 2010

I m making a project in which it check website about there status (Online / Offline) through there status code and when project is in processing it hang's until the whole line of code complete

[Code]...

View 5 Replies

VS 2010 Multithreading With WIA

May 11, 2010

I'm using the WIA Aut. Library [URL] , trying to capture photos from 5 digital cameras (Nikon D90) USB-connected to my pc. Now, I partially achieved my goal, what I do is:

- loop through the attached devices, connecting to every camera;

- fotocamera.ExecuteCommand (WIA.CommandID.wiaCommandTakePicture) ;

- other image processing operations...

Everything works fine but... the workflow is camera1 -> connect -> grab pic. => camera 2 -> connect -> grab pic. => camera 3.....

[Code]...

View 1 Replies

WIA Automation SDK And Multithreading?

Mar 11, 2010

I'm using the WIA Aut. Library [URL] trying to capture photos from 5 digital cameras (Nikon D90) USB-connected to my pc. Now, I partially achieved my goal, what I do is:

- loop through the attached devices, connecting to every camera;

- fotocamera.ExecuteCommand (WIA.CommandID.wiaCommandTakePicture) ;

- other image processing operations...

Everything works fine but... the workflow is camera1 -> connect -> grab pic. => camera 2 -> connect -> grab pic. => camera 3.....What I'd like is to make them shoot all at the same moment (...why? well, D90 waits around 1 sec. after a shoot... 1sec * 12 cameras * 500 photo sessions.. :'( )I told myself... what's the problem? You can create "shooting-threads" while looping through the device then launch 'em all.Done.It's still in a 'serial' way... :-(((Why? is executeCommand() a synchronized method? If I madly-fast click on two 'grab pictures' button of windows XP WIA dialog it works.. Is there something about .NET multithreading I don't know?

View 5 Replies

.net - Backup Fails Using Smo On Big Databases

May 18, 2011

I use vb.net to backup sql '05 - '08 databases. It works great on smaller databases. but when it comes to large databases it fails at 30 or 40 percent with the error: The backup or restore was aborted.

Dim objBackup1 As Backup = New Backup() With {.Action = BackupActionType.Database, .Database = Common.DsSettings("DataBase", Nothing), .Initialize = True, .Checksum = True, .ContinueAfterError = True, .Incremental = False, .LogTruncation = BackupTruncateLogType.Truncate}
objBackup1.SqlBackup(objServer)

View 2 Replies

.net - Marking Databases For A Particular Setup Only?

Dec 25, 2011

My application security from piracy depends upon fields in my databases. User has to activate the application, that writes Bought in my database. But the problem is if a new user installs my application and replaces all databases from some one who has bought key, the application also becomes active without buying key from me.

Is there any possibility that I could mark the databases to be recognized with the particular setup?

View 1 Replies

Add Nodes To A Treeview That Come From Different Databases?

Aug 25, 2009

I am trying to add nodes to a treeview that come from different databases, but at the moment i am just trying to add the first set from the first database.

The link between the child and the parent is the ID column in the parent nodes access database this number is in a column in the child database called Section, i am trying (unsuccesfully) to use queries and If statements.

I am assigning the ID column from the parent database to the .Tag property of the parent node and then i am trying to use an if statement within the query "asking" if the parentNode.Tag = number in section column Then Add new node, but i haven't done it right. The code is below:

While RetVal3.Read
If RetVal3(0).ToString = SectNode.Tag.ToString Then
Call AddCalcNodes(SectNode)

[Code]....

View 12 Replies

Assign Databases To SubReports?

Jul 4, 2011

I have written a Visual Basic 2008 program which creates a Crystal Report upon completion. The Crystal report contains the main report and two SubReports. Every thing runs fine on my development machine.

However, when I install the program at the client site, I get a dialog from Crystal wanting a user name an password. I notice at the top of this dialog that Crystal is pointing to the wrong SQL server.

As you can see from my code below, the server name should be correct. So I am guessing that it is the sub reports that are generating this error.

The sub report names are: rptPageOne and rptCostCenter

How do I set the datasource for the sub reports? Or what else could be wrong?[code]...

View 1 Replies







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