.mdb
-
I would like to ask what is the best db system that I can use to store data(ex:MDB or SQL)? and secondly could some one tell me how to use the .mdb system I whet through a lot websites but non of those sites have a clear coding. I found this one: but this just writes the columns, is there a practical way to use mdb.(I want to be able to use .mdb to its fullest capacity) :-D- any help is extremely appreciated -:-D ps: can you also give me the codes to save data to db as well (by the way I don't know anything about using db in vb .net) ------------------------------------------------------------------------
Try Dim ds As DataSet cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While ds = New DataSet D1.DataSource = ds.Tables Catch End Try dr.Close() cn.Close()
---------------------------------------------------------------------------- -
I would like to ask what is the best db system that I can use to store data(ex:MDB or SQL)? and secondly could some one tell me how to use the .mdb system I whet through a lot websites but non of those sites have a clear coding. I found this one: but this just writes the columns, is there a practical way to use mdb.(I want to be able to use .mdb to its fullest capacity) :-D- any help is extremely appreciated -:-D ps: can you also give me the codes to save data to db as well (by the way I don't know anything about using db in vb .net) ------------------------------------------------------------------------
Try Dim ds As DataSet cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While ds = New DataSet D1.DataSource = ds.Tables Catch End Try dr.Close() cn.Close()
----------------------------------------------------------------------------.mdb just means a microsoft access database which uses VB code behind it. SQL is a language to access data from a database such as SELECT * FROM TBL_CODEPROJECT. If your database is small Access is easier you don't have to code a lot for simple things. If you need a larger database then you can look at SQL Server (2003, 2005 or Express--which is free) to store your data then using something else (such as Access/VB, a .NET environment to access the data inside the database.
_________________________________________ You can't fix stupid, but you can medicate crazy.
-
.mdb just means a microsoft access database which uses VB code behind it. SQL is a language to access data from a database such as SELECT * FROM TBL_CODEPROJECT. If your database is small Access is easier you don't have to code a lot for simple things. If you need a larger database then you can look at SQL Server (2003, 2005 or Express--which is free) to store your data then using something else (such as Access/VB, a .NET environment to access the data inside the database.
_________________________________________ You can't fix stupid, but you can medicate crazy.
-
I would like to ask what is the best db system that I can use to store data(ex:MDB or SQL)? and secondly could some one tell me how to use the .mdb system I whet through a lot websites but non of those sites have a clear coding. I found this one: but this just writes the columns, is there a practical way to use mdb.(I want to be able to use .mdb to its fullest capacity) :-D- any help is extremely appreciated -:-D ps: can you also give me the codes to save data to db as well (by the way I don't know anything about using db in vb .net) ------------------------------------------------------------------------
Try Dim ds As DataSet cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While ds = New DataSet D1.DataSource = ds.Tables Catch End Try dr.Close() cn.Close()
----------------------------------------------------------------------------Check out this UpSizing article: http://www.sqlservercentral.com/columnists/dasanka/upsizingtheaccessdatabaseintothesqlserver.asp[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips