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


ADVERTISEMENT

VS 2010 2 Databases From 1 Listbox?

Mar 22, 2011

I have 2 Access databases;

Db 1 & Db 2, On the form is a list box which is data bound to DB1 'MainName', and a bunch of textboxs which populate from the record selected from db1 in the listbox.

In DB1 the 1st column is called 'MainName' and in DB2 the 1st column is also called 'MainName'

Now what im looking at is when the item in the listbox is changed, the record in the second database which has the same String in the 'MainName' column is also selected.

The route to take that i can see is having both databases added to the project , and have the listbox apply a filter on database 2 based on the selected item.
(im using 2 separate databases as when my project updates the DB1 also updates, but DB2 contains the users own strings so i don't want that to update as it would lose all there saved strings.I dont know much about lookup tables etc but they must all be in the same database right? so that rules them out, due to the update issue.)

View 2 Replies

Databases : Find An Angle In VB 2010 Express?

Apr 23, 2010

i want to create a windows form where i can add names, Employee ids and the projekt they are working on. Clicking a button should add the data to a database. Later id need to retrieve this data.First i was thinking that setting up a sql database and finding functions to access it would be fairly easy however.. Theres obviously more than one way of doing this and im having trouble finding the right angle...

View 13 Replies

VS 2010 Connecting To Detailed Databases WITHOUT MS Access Or SQL?

Dec 8, 2010

connect to 2 separate databases that control a system of logging in/out and the other a database of items. Think of it like logging in to ebay and searching for items. The only problem is that the x64 computers that will be used to run the final solution dont allow for MS Access databases or SQL databases to work for whatever reason.What other options do we have in order to have an effective system? A series of generated text files with the input registration details is so far the

View 3 Replies

Winforms - 2010 Synchronize Two Access Databases?

Sep 15, 2011

I'm writing a desktop application that uses the main access database that will be hosted on a central server, but there will be a laptop with the app on that has an offline mode so records can be created offsite. When the laptop returns I want it needs to be synced back to the main database.

Has anybody got any pointers on a way to do this, I've briefly read about JRO but is there an alternative / better method?

Originally, I was just going to write some custom code to do this, but thought I'd check to make sure there wasn't something already out there.

View 4 Replies

VS 2010 Application Development - Supporting Two Types Of Databases?

Apr 27, 2012

I want to design a application which can support two different types of databases same time e.g; when we install, it will ask which db it has to support and based on initial selection it should work with any db without changing anything in the application.In short it has to be developed keeping in mind that user may have either MS SQL or MySQL. It should support both.

View 4 Replies

VS 2010 Copy And Move Data Between Two Access Databases?

Feb 27, 2012

I have two MS Access database; Mydb1 and Mydb2. I would like to do the following:

1. Copy all records in table (MyTable1) from Mydb1 to Mydb2. MyTable1 also exists in Mydb2

2. Move all records in table (MyTable2) from Mydb1 to Mydb2. MyTable2 also exists in Mydb2 which needs to be flushed.

View 5 Replies

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

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

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

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

.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

Databases : Moving Away From MS Access?

Apr 5, 2010

I've been using MS Access for the database in many of my programs (they're always local databases, copied to the user's computer) and as is no surprise to anyone here, it's a horrible choice but it's what I knew and so I've just defaulted to it.What is the best one to use? How do I go about buying/getting it? Does it allow royalty-free copies? Can I import my existing Access databases into this? How do I deploy it?

View 1 Replies

DB/Reporting :: Creating New Databases?

Jan 8, 2009

I am writing an application in VB.Net, the application stores a number of images within the database and therefore the SQL database size gets quite large. At the moment I use a single database, however what I want to do is create a new database for each project within my application. I need some advise on the best way to proceed with this and also the best way to be able to create a new database for each project. Below is the approach that I was planning to adopt:

1. When the application is installed it automatically has a common database that comes with the application and this database is attached to the SQL Server, lets call this application "AppA" and common database "AppADB" Within the AppADB there would be a table called projectsTbl and in this projectsTbl it has a 2 columns called "projectDesc" and "projectDB". projectDesc would hold the description of a project and then the projectDB would hold the SQL database name for that project.

2. The user would login to my application and in the admin side of the application have a create project form. In this form he would enter the project description and also a 3 character code for the project. When the user OK's the form it would take the project descrption from the form and put this in the "projectDesc' field in the AppADB and then take the 3 character code from the form add this as a prefix to "AppADB" and put this within the "projectDB" field within the AppADB e.g. if the 3 character code was "SIM" then the projectDB name would be "SIMAppADB"

3. What I obviously now need to do is create a new database called "SIMAppADB" now what I was thinking was I could create a SQL database backup of a database that has the standard database structure that is required and then I can restore this .bak file (which would be in my application installed directory) to this new name, using the following code:

Code:
RESTORE DATABASE SIMAppDB
FROM DISK = 'C:Program FilesAppA Installed DirectoryDB.Bak'
WITH REPLACE, MOVE SIMAppDB_Data' TO 'C:MSSQLDATASIMAppDB_Data.MDF',
MOVE 'SIMAppDB_Log' TO 'C:MSSQLDATASIMAppDB_Log.LDF'

4. Then when the user logins to my application again, on the login screen he will see a list of projects from the "projectsTbl" table in the "AppADB" database. The user can then select the project they wish to login to and from this the application and extract the database name from the "projectDB" table in the "AppADB" database. I then can store this database name in my application and when the application needs to connect to the database it modifies the connection string to connect to the respective database.

View 1 Replies

DB/Reporting :: Databases Using VB 2008?

Apr 8, 2009

I am making a program that will take your initial balance of your checking account and then you can enter your checks, deposits and withdrawls into a database. Then The option will be given to return a report of deposits, withdrawls, etc. Well, I am having the problem with creating a database I can open when the program runs, first time to get the initial balance, and after to tell current balance. Then, I need to just keep on adding the new checks, deposits, withdrawls to the database everytime the person uses it. So, say I used it and put in 5 checks and then a week later I use it and put another 5 in. I want to be able to give a report of all the checks that have been inputed (this example is 10) back out to the user. So, essentially my question is, I guess, how would I create a database in VB 2008 that I can keep adding to it everytime it gets used?

View 1 Replies

Entities And Multiple Databases?

Sep 26, 2010

We've got the following scenario:

Central Database (replicated across multiple servers)
Client Database 1
Client Database 2

The Central db has Users and Roles amongst other things The Client dbs have similar tables to each other but with some fields tweaked - contact, address, At present, each client db has its own user/role information which is copied from the central db by a scheduled process. I want to retrieve the user/role information directly from the central db instead (bearing in mind tables in the client db make reference to the user entity)

View 1 Replies

Enumerate All Running Databases

Oct 20, 2009

I'm writing a little Database administration program.It works fine if you give the db, but not when you don't know which db is installed.How can I enumerate all running databases?

View 4 Replies

Get Total Number Of Databases?

Oct 5, 2010

how to get total number of databases available in SQL Server database in Combo box and display total number of tables in that database in ListView

View 6 Replies

How To Get Total Number Of Databases

Jun 24, 2011

How to get total number of databases available in SQL Server database in Combo box and display total number of tables in that database in ListView.

View 1 Replies







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