473,385 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

database access


--
hello
I have VB.net standard.
I thought this version has no data access but I have data controls .

Do these things work with standard?

Can i connect to a access database? I tried OLEadapter1 and a datagrid but
nothing happens when i click on datasource property like VB6...i dont know,
can anyone help please.
Nov 21 '05 #1
6 1013
Hi,

Click on the oledbdataadapter1 in the properties you will see in the
bottom you will see generate dataset. After that wizard is finished you
will see the dataset in the datasource property of the datagrid. One last
step in the form load event you need to fill the dataset.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

DataSet11.Clear()

OleDbDataAdapter1.Fill(DataSet11)

End Sub

Ken

-------------------------

"john andrew" <jo********@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...

--
hello
I have VB.net standard.
I thought this version has no data access but I have data controls .

Do these things work with standard?

Can i connect to a access database? I tried OLEadapter1 and a datagrid but
nothing happens when i click on datasource property like VB6...i dont know,
can anyone help please.
Nov 21 '05 #2
I have got a datagrid working, can I assign a datafield from a datasource to
a textbox like in VB6?

Nov 21 '05 #3


"john andrew" wrote:
I have got a datagrid working, can I assign a datafield from a datasource to
a textbox like in VB6?


scrub that as i just found out what to do in databindings.

can I navigate like in VB6, move and add ect....can you do this?

Nov 21 '05 #4
Hi,

TextBox1.DataBindings.Add("Text", DataSet11.Tables(0), "Country")

Ken

------------------------

"john andrew" <jo********@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
I have got a datagrid working, can I assign a datafield from a datasource to
a textbox like in VB6?
Nov 21 '05 #5


"Ken Tucker [MVP]" wrote:
Hi,

TextBox1.DataBindings.Add("Text", DataSet11.Tables(0), "Country")

Ken

------------------------

"john andrew" <jo********@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
I have got a datagrid working, can I assign a datafield from a datasource to
a textbox like in VB6?


Thanks i will try it out,
How do I move next recprd for example? I n VB6 you have a recordset.( Where
can i find this information instead of asking so many questions)

Nov 21 '05 #6
In your declarations add:
Private bmb As BindingManagerBase

Then in the section where you make your connection: (or in Form Load if you are not making your connection in code)
bmb = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)

To step forward thru the records:

Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click

If bmb.Position < bmb.Count - 1 Then

bmb.Position = bmb.Position + 1

' add code here to change the display......such as textboxes etc. that you might have bound to the datagrid fields.

End If

End Sub

To move backwards:

Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click

If bmb.Position > 0 Then

bmb.Position = bmb.Position - 1

End If

' add code here to change the display......such as textboxes etc. that you might have bound to the datagrid fields.

End Sub

This should give you and idea on how it works.
Good luck.
james
"john andrew" <jo********@discussions.microsoft.com> wrote in message news:BC**********************************@microsof t.com...


"Ken Tucker [MVP]" wrote:
Hi,

TextBox1.DataBindings.Add("Text", DataSet11.Tables(0), "Country")

Ken

------------------------

"john andrew" <jo********@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
I have got a datagrid working, can I assign a datafield from a datasource to
a textbox like in VB6?


Thanks i will try it out,
How do I move next recprd for example? I n VB6 you have a recordset.( Where
can i find this information instead of asking so many questions)

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sarah Tanembaum | last post by:
I was wondering if it is possible to create a secure database system using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc)...
3
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading...
10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
5
by: premmehrotra | last post by:
I currently have a multi-user access database which is put on a shared drive L: on a Windows Servers. Entire database is one file premdb.mdb. Users access this database from their laptops....
8
by: John Baker | last post by:
Hi: I am URGENTLY in need of some book or web site OR tool that will help me integrate a relatively simple access application into a web page or pages. This is a time recording system (by...
1
by: Claus Haslauer | last post by:
Hi, firstly, I am new to access03 and server03 Originally, I had written an access 2002 database. Then, we transferred (for another reason) to server 2003. Then, we got access 2003. Then I...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
7
by: Allison | last post by:
Hi -- we are a small manufacturing looking for a multi-user database to take customer orders (nothing too complicated, with 3 users total). We think we should be using Access, but are wondering...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
21
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.