Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Access2000 With Datagrid ADO Control


I have a access2000 database set with a password. i need to access records in tables of this database from VB6. i want to display these records in a datagrid. simply i am using a datagrid bound to a ADO control to which connects to the database. how can i do it without creating any new ODBC sources (from VB code only). I tried but i get authentication failed message. I think i am not getting the connection string right.
could you help me please?

thank you in advance.

Regards,
hasitha

 

Edited by - hasitha on 2/2/2004 11:57:38 AM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help....! How Can I Use Datagrid In Access2000?
Hi gals and guys

I tried to use some datagrids in a access2000 form with adodc, but i could not find how to connect datagrid with adodc. i spend a lot of time on searching the articels which were relevant to datagrid using in access2000, but it was hardly to find any useful one. So, if anyone has articles or idea about datagrid in access2000, would you email me or reply at the forum.

Thanks in advance


Ruonan
ruonanz@interchange.ubc.ca

VB6.0, Access2000, ADO2.5, DataGrid Help
I am using VB6.0, Access/2000, ADO library 2.5.  I am trying to use MS DataGrid to retrieve some rows from the Access database and display it over the grid in Visual Basic form by concatenating some of the retrieved values in the recordset.  Can anyone give me idea in order to achieve this. If you can give some sample code it would have been very helpful.
thanx

VB6 Access2000 .. Master Detail Particular Column Value Of Datagrid
I am using datagrid in my dataentry form. I am using master detail recordset with the datagrid represents the child recordset. The datagrid has three columns train No., train name and duration. I want that if the user enters train no. in the first column then the second column automatically takes the corresponding train name. It should take this data from the separate table containing train no. and train name as two fields.
Pl. help

Using Access2000 And Want To Use The Inet Control
can someone please tell me how to get the inet control so i will be able to use it in MSACCESS?
Thanks

Access2000 Password Protected Db And Data Control
To use Data Control with Access 97 password protected db I used :

data1.Connect = ";pwd=PASSWORD"
data1.DatabaseName = "C:DBName"



Before Service Pack 4, VB DC did not work with Access 2000. Now I do not have any problem with db with no password. But if there is a password then neither ";pwd=PASSWORD" nor "Access2000;pwd=PASSWORD" values for Connect property work. How to use intrinsic DC with Access 2000 password protected DB? This is an existing pretty big project containing several DC (don't ask why they were used). DC cannot be replaced with DAO or ADO recordsets - too much work.
Thank you.
Vlad.

Refresh DataGrid(Microsoft DataGrid Control 6.0)
Hi,

I am having a problem refreshing the datagrid in the following scenario:

I have Form1 with ADODC control and DataGrid(Microsoft DataGrid Control 6.0). The grid (is used to display employee records) contains 5 columns (for example Office telephone number) . On clicking of a row on the grid the details window opens up. This window is used to update the employee information. On saving the employee record if Office telephone number is changed then the datagrid should be refreshed with latest data of the record. The refresh is done using the following command:
msgbox "activate"
adodcobject.refresh
datagridobject.refresh.

If the message box is commented then the refresh statements do not get executed. I need a solution for that.

Regards,
Rashmi.

How Do I Get This Information Into A Datagrid Control (datagrid)???
I have this information that i want to call out of a file and put into a data grid.
"AL","Alabama"
"AK","Alaska"
"AS","American Samoa"
"AZ","Arizona"
"AR","Arkanzas"
"CA","California"
"CZ","Canal Zone"
"CO","Colorado"
"CT","Connecticut"
"DE","Deleware"
"DC","District of Columbia"
"FL","Florida"
"GA","Georgia"
"GU","Guam"
"HI","Hawaii"
"ID","Idaho"
"IL","Illinois"
"IN","Indiana"
"IA","Iowa"
"KS","Kansas"
"KY","Kentucky"
"LA","Louisiana"
"ME","Maine"
"MD","Maryland"
"MA","Massachusetts"
"MI","Michigan"
"MN","Minnesota"
"MS","Mississippi"
"MO","Missouri"
"MT","Montana"
"NE","Nebraska"
"NV","Nevada"
"NH","New Hampshire"
"NJ","New Jersey"
"NM","New Mexico"
"NY","New York"
"NC","North Carolina"
"ND","North Dakota"
"OH","Ohio"
"OK","Oklahoma"
"OR","Oregon"
"PA","Pennsylvania"
"PR","Puerto Rico"
"RI","Rhode Island"
"SC","South Carolina"
"SD","South Dakota"
"TN","Tennessee"
"TX","Texas"
"TT","Trust Territories"
"UT","Utah"
"VT","Vermont"
"VA","Virginia"
"VI","Virgin Islands"
"WA","Washington"
"WV","West Virginia"
"WI","Wisconsin"
"WY","Wyoming"

And i want to get it into a data grid.
How do i do this??????

How Do I Get This Information Into A Datagrid Control (datagrid)???
I have this information that i want to call out of a file and put into a data grid.
"AL","Alabama"
"AK","Alaska"
"AS","American Samoa"
"AZ","Arizona"
"AR","Arkanzas"
"CA","California"
"CZ","Canal Zone"
"CO","Colorado"
"CT","Connecticut"
"DE","Deleware"
"DC","District of Columbia"
"FL","Florida"
"GA","Georgia"
"GU","Guam"
"HI","Hawaii"
"ID","Idaho"
"IL","Illinois"
"IN","Indiana"
"IA","Iowa"
"KS","Kansas"
"KY","Kentucky"
"LA","Louisiana"
"ME","Maine"
"MD","Maryland"
"MA","Massachusetts"
"MI","Michigan"
"MN","Minnesota"
"MS","Mississippi"
"MO","Missouri"
"MT","Montana"
"NE","Nebraska"
"NV","Nevada"
"NH","New Hampshire"
"NJ","New Jersey"
"NM","New Mexico"
"NY","New York"
"NC","North Carolina"
"ND","North Dakota"
"OH","Ohio"
"OK","Oklahoma"
"OR","Oregon"
"PA","Pennsylvania"
"PR","Puerto Rico"
"RI","Rhode Island"
"SC","South Carolina"
"SD","South Dakota"
"TN","Tennessee"
"TX","Texas"
"TT","Trust Territories"
"UT","Utah"
"VT","Vermont"
"VA","Virginia"
"VI","Virgin Islands"
"WA","Washington"
"WV","West Virginia"
"WI","Wisconsin"
"WY","Wyoming"

And i want to get it into a data grid.
How do i do this??????

Using Active X Control(Datagrid Control) In MSAccess (NOT Resolved)
Hi,

Does anyone know how to assign a record source to a data grid control in Msaccess. Iam unable to find a Data source/Record source property/method in it.

Thanks.



Edited by - XTab on 4/8/2003 12:45:52 AM

How To Control Tab/enter Order In A Datagrid Control
Hi,

Assume i have a datagrid1 on my screen with 3 columns, name, mark and age.

I created a recordset called rst1 which sql statement is 'select name, age from student'.

I have another recordset called rst2. I appended 2 columns into rst2 using following code:
>> rst2.Fields.Append "Name", adVarChar, 20
>> rst2.Fields.Append "Mark", adDouble
>> rst2.Fields.Append "Age", adInteger

Then i copy Name from rst1 to rst2 using following code:

>> If rst1.BOF = False Or rst1.EOF = False Then
>> Do While rst1.EOF
>> rst2.addnew
>> rst2.Fields(0) = rst1.Fields(0)
>> rst2.Fields(2) = rst1.Fields(1)
>> rst2.Update
>> rst1.movenext
>> loop
>> end if

Then i set rst2 as my datagrid1's datasource:
>> Set .DataSource = adoRstQcShipmentTest

Now i got a populated datagrid with 2 columns, first column contains student names, second one is empty, third one is student age.

What i want to do now is enter mark for each student.

My Question here is how can i control the tab order? I hope the cursor can always keep in the second column (because i only need to enter data in that column). For example, when i entered mark in row 1, then i press TAB or ENTER, i hope the cursor can move to column2 in row2. But now it will move to columns3 in row1.

Please help
Grace

Beside VB 6.0's Default Datagrid && Tab Control, Which Is The Best 3rd Party Control
I m doing my new project on database application and i want my application look nice and user friendly.
I don't like the look of visual basic 6.0's default datagrid control and tab control.........Please could any one tell which is the best 3rd party datagrid control and 3rd party tab control (container).
Thankx

Beside VB 6.0's Default Datagrid && Tab Control, Which Is The Best 3rd Party Control
I don't like the look of visual basic 6.0's default datagrid control and tab control.........Please could any one tell which is the best 3rd party datagrid control and 3rd party tab control (container).
Thankx

MS DataGrid Control
using the Microsoft DataGrid control...
How do I prevent it from updating the previous record when focus gets moved to a new record?

DataGrid Control
Hi All,

When populating a DataGrid Control - the data populates OK

The code does updates textboxes when a whole row is selected using Bookmark property

However When i try to scroll up and down using arrow keys the result set are NOT updated in text boxes. Any ideas on how to do this??

Chet

DataGrid Control Bug...
Hi,

I have notcied that the DataGrid sometimes works and sometimes doesn't. I used the DataGrid to display a list of invoices which worked the first few times. But if you change too many of the DataGrid propertys it loses its functionlity. Is this a bug or is it like that. What I mean is I changed the font about 5/6 times and it stopped readding the data. When I removed that DataGrid and replaced it with a newone and renaming it it began to work again. Currently, it stills keeps "switching" like described earlier, at this is really anooyin as there are large amount of users who are going to be using this application.

Any thoughts/Comments, greatly appreciated as always...
VD

DataGrid Control Help
Hi!!

I want to display the query results into my form. i thought a DataGrid might be the solution.

The problem I have now is that I don't know how to link the query results into the DataGrid... I also want the data grid to display some other data (this data will do some calculations of some data of the query) So I want to add more columns to the data grid.
Do you know how can I do this?
Do I have to use another thing???

Thanks in advance!!

DataGrid Control
Does anyone know how to enable a specific row of data in a data grid to be highlighted first before a user can delete it, using a command button and not pressing [del]?

Using The Datagrid Control
How do i make one of the columns in the datagrid control as a
combobox (datacombo is better) and place data in the combo
listfield from one table and to the datafield from another
table wich both are connected?

Secondly, how do i make a specific column wich shows boolean
data as checkbox in run time?
when i make it in design time it still shows 0 or 1 rather
than a checkbox.

DataGrid Control
I have a problem with DataGrid Control. I fill it with data,ok? but this information are not visible totally --> I need to use scroll up and scroll down to view it, ok? But when I use the wheel mouse, datagrid control scroll down/up a little and it stops in fact.

What does it happen?


Thanks for all,
Excuse for my english, I'm a catalonian student.

Datagrid Control
Hello!!! I obtain Access table data and I want show it into Datagrid control? I use SqlDb to obtain this data. How I can show the informationinto my datagrid control?????

Can you put in any example or link access to this?

Thanks.

DataGrid Tab Control
Got a question. I am trying to specify which tab I want in the foreground in my code, but I have not had any success. I have four tabs on a datagrid, and based on whichever radio checkbox the user selects, I want a certain tab to be selected/in front. Any ideas?

Datagrid Control
If I understand it correctly that the content of cells of Datagrid control can be editted from the keyboard, but I can not get it to work, Please help.

Also please give me an example how to connect DAO(microsoft Jet) to Datagrid control and how to use the button on this control.

DataGrid Control
hi
i am using data grid control to show my all record into a table
i m using it as i m using recordset RsEmp

set DataGrid.datasource = RsEmp

And when i unload form i use
RsEmp.close
set RsEmp = Nothing

i want to ask you that using these statements, will RsEmp leave the memory or it will load in memory becuse it will waste my memory. if RsEmp have 10000 records then all will remain in memory???
plz tell me about my memory, Thanks

DataGrid Control
I've opened a connection and created a working recordset using the ADO methods.


How can I display the data from my recordset in a Datagrid control?

Datagrid Control
hi,
i am using a adodc control in my vb form. i have connected this adodc control to a MS SQL database. the adodc control is retrieving the records properly.
i wanted to display all the records retrieved by the adodc control in a data grid control. so i inserted a data grid control on to the same form and set its data source property as the adodc control. when i ran my project no records are fetched in the data grid control.
i dont know what the problem is. i tried visiting various vb sites and the procedure they have mentioned there seems to be identical to what i have followed but the data grid control does not display any records.
i have pasted the following code in the form load method
Adodc1.Refresh
DataGrid1.Refresh
but still it is of no use.
please advice.
amol

VB.Net Datagrid Control?
Anyone knows where the tutorial is and how to do this thing please teach. thank you.

Datagrid Control
hi to all,

Can I use the DataGrid control that does not bound with a data source? I mean, can I use it like any other control like a Textbox control that I can manipulate manually. I do not want to conect it to a data source, I just want it so that a user can manually add values in it. tnx

Datagrid Control
I need to create a form in Visual basic 6.0 where if we type any Oracle queries in the text box, it should display the fetch the datas from Database and display it in the datagrid control in VB. Can any one tell me how to do that. or pls give any website where we get this information.

if possible send me that code to my email Removed By Mod


Thanks in advance

Is There A Way To Control A Datagrid Like This?
I'm kind of new to visual basic and i want to use a Datagrid to show only the columns i want from a table, not every single one. The code i use is


VB Code:
Set DataGrid1.DataSource = Adodc1


I tried changing the records source to only select some of the columns and then set the datagrid source again but it shows all the columns

(Not actual code)

VB Code:
Adodc1.RecordSource = "select table1.field1, table.field2"


Also, i would like to know if i can manipulate the place were column names are displayed so that when i click on them it sorts the data based on the clicked column.

Thanks

Using The Datagrid Control?
Hi,

I'm about to try and use the Dat Grid Control for the first time.

So far I've connected to my Database and populated the Grid with my RecordSet.

My first question is, does the control automaticaly add an index to each row that is added?

Is there a way to control what the index is?

Here's what I have so far: -


VB Code:
Private Sub Form_Load()     Dim adoCnn As New ADODB.Connection    Dim adoRstProds As Recordset        adoCnn.Open "Provider=MSDAORA;Password=PASSWORD;User ID=USER;Data Source=SOURCE"        '* On connection to DB, 1 is return for a sucessful connection.    If adoCnn.State <> 1 Then        MsgBox "Unable to connect to Oracle!"        Exit Sub    End If     Set adoRstProds = New ADODB.Recordset    adoRstProds.CursorLocation = adUseClient        adoRstProds.Open "SELECT ID, CODE, DESCRIPTION FROM TB_ARTICLES", adoCnn, adOpenStatic, adLockOptimistic        Set DataGrid1.DataSource = adoRstProds    DataGrid1.AllowAddNew = True    End Sub


The above RecordSet is returning the ID, which is a primary key.

So I can reference the record returned an possibly make change to the record I need to know which row in the Data Grid was changed (?) so I can update it in the DB.

So how can I determine which record from my RecordSet was changed.

Also how can I add a record?

Regards

DataGrid Control
I have a DataGrid Control with 4 columns in it.
I would like to get the value of all 4 columns when doubleclicking.
How to do this?

Datagrid Control
When editing values in the datagrid control the following message appears :

"Insufficient or Incorrect Key column Information"

What could be the cause and solution for this problem?

About Datagrid Control
HELLO
I MY PROJECT I AM USING DATAGRID CONTROL AND 3 TEXTBOXES
ON COMMAND CLICK OF COMMAND BUTTON ALL VALUES IN TEXT BOXES SHOULD BE
ADDED TO DATAGRID.....
GIVE ME FULL CODE
THANKS

DataGrid Control
I'm looking into purchasing a datagrid control. So far I've looked at ComponentOnes Ture DataGird and Infragistics UltraGrid.

Are there any other good grids out there? I do a ton of work with ADO and datagrids, so I want a more powerful grid. However, since work is purchasing it and I don't have time to create my own, I want to purchase one.

Any suggestions on Grids to look into?

Thanks

About Datagrid Control
hi---->>


any one can tell me how to connect datagrid control by ADO object (through code) i have also attched
zip file....


please send me full syntex by

thank you

DataGrid Control
Hi, everybody.

Does anybody know if it's possible to disallow to highlight the whole column when you click on column's header? Like a property of MSFlexGrid control AllowBigSelection=False.

Thank you in advance.

DataGrid Control?
Hi guys. I am working on an application using the videosoft VSflexgrid 7.0 light control. I need to be able to read data into cells and then pull it out of them. However, we have no documentation on this control here at work, and I am unable to find anything on the internet. Have any of you ever used it, and might you possibly have documentation on it, or at least any examples on how to write to and read from the cells. I can't even reference the darn things as I don't know their coordinates (there are no X or y axis markings)
David

Datagrid Control
Quote: I am using a Datagrid in my application. I populate it from a recordset. I am trying to change the data that is displayed in a certain cell if the cell is a certain value. Here is the code that I have. When I run it, I get an error that the column is read only. I don't want to update the data in the database, but rather a decode of the data. Anyone know how to do this.


Code:

If Trim(DataGrid1.Columns(4).Value) = "M" Then
DataGrid1.Columns(4).Text = "Processed Check"
End If



I actually figured this out by myself immediately after re-reading my original post. I just decode in the SQL statement instead.

How To Use DATAGRID Control
Hai Guys,

I am in need of sample code for data Grid connected with SQL SERVER.

How to handle the Add, Modify, Delete Modes.

Thanks in Advance.

Bye,
Karnan.S

Datagrid Control In VB 6.0
Hi,
My boss still making me to write in VB 6.0 while everybody else is using .net. I really don't like it because it seems less help I can find.
This is the first time I use datagrid control and I could not find enough documents to help me.
I need to write a class module to pass data from it to my datagrid on the form.
When I ran my program in debug mode(F8), I found out that the class module has never been called.
Can someone help me with this?

Can someone tell me what I did was wrong that my datagrid control is not filled with data?

Thank you very much!



===================

The code within the form where the data grid control is:

' Bind the DataGrid to the new DataSource datNames
Dim datNames As NamesData ' Class variable

Set datagrid1.DataSource = datNames
'Should I do anything else other than above?
===============



Below is the class module
==========

Option Explicit
Const DB_CONNECT = "Provider=SQLOLEDB; Data Source=BSQL; " & _
"Initial Catalog=TestField; User Id=flduser;Password=flduser;AutoTranslate=No"
Private WithEvents rsNames As ADODB.Recordset

Private Sub Class_Initialize()
' Add the names of the new datamember to the DataMember collection
' This allows other objects to see the available DataMembers
Dim dbField As ADODB.Connection

Set dbField = New ADODB.Connection
Dim strSQL As String
Dim rsNames As Recordset
Set rsNames = New ADODB.Recordset

dbField.Open (DB_CONNECT)
strSQL = "select * " & _
" from dbo.Daily_PPR"

rsNames.Open strSQL, dbField, adOpenDynamic, adLockOptimistic



End Sub

Private Sub Class_GetDataMember(ByVal DataMember As String, _
Data As Object)
Set Data = rsNames
End Sub
================

Datagrid Control In VB.NET
I am wondering if anyone knows the syntax to set up the datagrid in VB.NET. It's got my mind boggled. Any help would be greatly appriciated.

Thanks

Dave

Datagrid Control
datagrid control ...?

DataGrid Control
Microsoft says (see below) that  you can drop down a VB control. Anyone know how??

The built-in button is enabled for a column when its Button property is set to True.

Typically, you enable the column button when you want to drop down a Visual Basic control (such as the built-in combo box, a bound list box, or even another DataGrid control) for editing or data entry. When the button in the current cell is clicked, the ButtonClick event will be fired. You can then write code to drop down the desired control from the cell.

Datagrid Control
HI Folks Newbie here,

I have an ado control hidden on my form and an associated datagrid with
an sql query which retrieves the data that I want.

I now want to create a popup menu which I can do however what I would
require is that when the user right clicks that the record pointer
moves to the nearest record to the mouse pointer so that I can give the
user of editing the data. I do not want them to edit the data directly
on the grid but instead wish to present them with a new form where the
editing will take place.

All help appreciated

I am using VB6 on windows XP with SP5 installed

Amrik

Using DataGrid Control
Hi

I am using DataGrid for multiple data entry in VB. But the problem with this is that it accepts more charecters than the real column width. Is that possible to Limit Number of characters in a particular column? if so, How?

Need Help With DataGrid Control
My system is a Windows NT4 PC with "Working Model Edition" of VB6.
I am acesssing a MS Access database.

I need help with the DataGrid control. I have a book which describes the
DataGrid control, but it is not entirely clear what I have to do to just
list all the rows of one specific table. I have a number of tables in the
database I am using. I would rather code one function at runtime that
could display any table rather than coding a bunch of controls at design
time (ie. one control for each table in the database !!).

I need details on how to accomplish this task. If you could also point me
in the direction of an example that would be great!

TIA for all your help.

Help With Datagrid Control!!!!!
I want to load an adodb.connection and recordset to a datagrid placed on my form. The thing is that i open the connection,
and when i try to load the records to be shown into the datagrid it does nothing. It doesn't get me any error message although.
I want to load the records to the datagrid and manipulate them, how can it be done??


Private Sub Form_Load()

Dim adoCN As ADODB.Connection
Dim adoRS As ADODB.Recordset
   
 Set adoCN = New ADODB.Connection
   With adoCN
      .ConnectionString = _
         "Provider=MSDASQL.1;" & _
         "Persist Security Info=False;" & _
         "Data Source=mystery"
      .Open
       Set adoRS = New ADODB.Recordset

End With
adoRS.Open "mystery", adoCN, adOpenKeyset, adLockOptimistic, adCmdTable
      
  With adoRS
   
   Do Until .EOF
   Set DataGrid1.DataSource = adoRS
    .MoveNext
   Loop
      
 .Close
   End With
   
   Set adoRS = Nothing
   adoCN.Close: Set adoCN = Nothing
      
End Sub



Edited by - tasangr on 9/23/2004 12:33:29 AM

What Is The Datagrid Control Actually Used For?
Can I connect this to a recordset object and automatically populate a datagrid control (like how it is done in vb.net)? Or is there another similiar control?

Datagrid Control
Hi,

I am using Dagrid to display my record from Access 2000 database. I use Adodb.command object to set the datasource and it is working fantastic.

my problem is while it display the data in the grid if I close the connection it removes the data from the grid. but I want the data to be displayed until I unload the form. is there any way to load the data from the table into a datagrid and remove the conneciton with the table. but the datagrid should show the already loaded records in it.

or do I need to use MsFlexGrid control for it. but to work in flexgrid will it take more executable time in a network environment for a mdb file with 5MB.

Looking for valuable advice.

Thanks

Kishor

 

Copyright © 2005-08 www.BigResource.com, All rights reserved