User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,703 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,196 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 1096 | Replies: 2
Reply
Join Date: May 2007
Posts: 19
Reputation: pranto157 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pranto157 pranto157 is offline Offline
Newbie Poster

Question need help! DAO + DataGridControl

  #1  
May 14th, 2007
how can i show data into DataGridControl 6.0 by using dao connection method.
Note: database is Oracle 8i.

plz reply me........................
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

Re: need help! DAO + DataGridControl

  #2  
May 29th, 2007
I've got a program similar to what u wanted.If u really want this send me a notification mail to me.My email id is :
choudhuryshouvik@gmail.com
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

Re: need help! DAO + DataGridControl

  #3  
May 30th, 2007
Originally Posted by choudhuryshouvi View Post
I've got a program similar to what u wanted.If u really want this send me a notification mail to me.My email id is :
choudhuryshouvik@gmail.com




INSTRUCTIONS ON CONFIGURATION:-

I donot have oracle installed on my computer. I did this on a sql server database. So before try to run this code u need to configure the controls and do some tasks. Here are the instructions. Just follow these steps :-

1.start oracle
2.create a table with name "information" having the following two fields :-
rollno int, name varchar(25)

3.open vb and create a new standard.exe project
4.take two labels,two textboxes,one button,one datagrid control and one adodc control
5.name the controls as follows :-
text1->txtroll
text2->txtname
commnad button->cmdadd
6.add captions to the labels as Rollno and Name respectively.
7.right click on adodc1->properties->on first page select use connection string->build->click provider tab and select microsoft oledb provider for oracle->next->enter username and passwd->click test connection(if it displays test connection succeded then ur connection has done)->click ok->goto authentication tab->enter username and passwd->goto recordsource tab->select 2-adcmdtable from commandtype->select the table "information" from the table dropdown list->click ok. After this ur adodc configuration will complete.
8.select datagrid control->press f4->select datasource properety and change it to adodc1 or whatever ur control name will be->right click on datagrid control6.0->select retrieve fields->click yes->right click again->select properties->enter a caption->goto columns tab->change captions of the fields to whatever u want to be displayed->click ok. After this ur datagrid configuration will complete
9.now paste the following code into ur form module
10.make sure oracle is still running and then run & compile the source code.

If u still got any problems u can mail me or post it here.(I prefer mailing)

Here is the source code :-

Option Explicit

Private Sub cmdadd_Click()
If Trim(txtname.Text) <> "" And Trim(txtroll.Text) <> "" Then
With Adodc1.Recordset
.AddNew
![rollno] = Trim(txtroll.Text)
![Name] = Trim(txtname.Text)
.Update
End With
Adodc1.Refresh
MsgBox "Database updated."
txtname.Text = ""
txtroll.Text = ""
txtroll.SetFocus
Else
MsgBox "Plz insert some information first.", vbApplicationModal + vbExclamation, "Blank data"
txtroll.SetFocus
End If
End Sub

Private Sub Form_Load()
Adodc1.RecordSource = "information"
Adodc1.Refresh
End Sub
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 2:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC