Now I have to use DBGrid to edit and retrieve from the database.
So how can I do that in VB6.0?.So kindly reply me anyone quickly.
9 11590
Now I have to use DBGrid to edit and retrieve from the database.
So how can I do that in VB6.0?.So kindly reply me anyone quickly.
- Private Sub Command1_Click()
-
-
rs0.opend "select * from table ", Conn
-
db.DataSource = rs0
-
End Sub
-
-
in this way u can retrive the data
- Private Sub Command1_Click()
-
-
rs0.opend "select * from table ", Conn
-
db.DataSource = rs0
-
End Sub
-
-
in this way u can retrive the data
I couldn't access with that code. So I want the codings with some more details.
I couldn't access with that code. So I want the codings with some more details.
explain me thy reqd in detail
explain me thy reqd in detail
I want to retrieve the database fields in DBGrid .
My database table is table1,The fields are empid,dat....
For that kidly send me the codings to show/edit the databse contents in DBGrid1.
I want to retrieve the database fields in DBGrid .
My database table is table1,The fields are empid,dat....
For that kidly send me the codings to show/edit the databse contents in DBGrid1.
-
-
dim Rs0 as new Adodb.Recordset
-
dim Conn as new Adodb.Connection
-
Conn.open " Connection String"
-
ssql="select * from table1"
-
rs0.open ssql,Conn
-
with grd
-
-
do while rs0.eof=false
-
.rows=.rows+1
-
.textmatrix(.rows,1)=rs0("fiildname") &""
-
.textmatrix(.rows,2)=rs0("fiildname") &""
-
rs0.movenext
-
loop
-
rs0.close:set rs0=nothing
-
end with
-
in this way u can retrive d data
-
-
dim Rs0 as new Adodb.Recordset
-
dim Conn as new Adodb.Connection
-
Conn.open " Connection String"
-
ssql="select * from table1"
-
rs0.open ssql,Conn
-
with grd
-
-
do while rs0.eof=false
-
.rows=.rows+1
-
.textmatrix(.rows,1)=rs0("fiildname") &""
-
.textmatrix(.rows,2)=rs0("fiildname") &""
-
rs0.movenext
-
loop
-
rs0.close:set rs0=nothing
-
end with
-
in this way u can retrive d data
I tried with that code.But the error occured as "Object required"
I tried with that code.But the error occured as "Object required"
for that first of all add control of grid and rename it to the name of grid which ihave given in 'with' code
for that first of all add control of grid and rename it to the name of grid which ihave given in 'with' code
Can you explain me the following code from you have given - .rows=.rows+1
-
.textmatrix(.rows,1)=rs0("fiildname") &""
-
.textmatrix(.rows,2)=rs0("fiildname") &""
Can you explain me the following code from you have given - .rows=.rows+1
-
.textmatrix(.rows,1)=rs0("fiildname") &""
-
.textmatrix(.rows,2)=rs0("fiildname") &""
line 1 increments grid row by one
2 assigns recordset's field data to perticular cell with last newest row and 1,2 column
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ranyart Olias |
last post by:
Can anyone explain why the
<root@hiddenworld.net>
portion of this html doesn't render in a browser,
but the
<20031010152346.GA15353@server.hiddenworld.net>
portion does?
Here is the html...
|
by: John D |
last post by:
can anyone explain why a site would use this in their page
<!--<BR>-->
Presumably it is hiding the <BR> from ... ???
TIA
John
|
by: Chris |
last post by:
Hello
Could anyone explain why the following:
#footer ul
{
float : left;
margin : 2px 0px 7px 28px;
padding : 0px;
width : 360px;
|
by: C++fan |
last post by:
The following code is for list operation. But I can not understand.
Could anyone explain the code for me?
/*
* List definitions.
*/
#define LIST_HEAD(name, type)
struct name {
type...
|
by: Andrew |
last post by:
Hello, friends,
I am implementing web app security using asp.net 1.1, and I found the
following source code from Yahoo! Mail login page:
<form method="post"...
|
by: Jia Lu |
last post by:
Hello
I have a program that can telnet to a host.
But I cannot understand from part, can anyone explain
it to me?
Thank you very much.
import sys, posix, time
|
by: Bhuwan Bhaskar |
last post by:
Hi,
Can anyone explain when to use state server or Sql server to save sessions.
Thanks,
Bhuwan
|
by: Eclipse |
last post by:
G'day all
Can anyone explain the difference in the results to me as I don't understand why specifying the directory name in two different ways could give a different answer.
In CODE 1 below i...
|
by: Eddie Rivera |
last post by:
I am trying to add a search box on a form in Access to link to other tables. Can anyone explain how this is done?
Thanks for your help in advance!
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
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...
| |