473,395 Members | 1,658 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,395 software developers and data experts.

i have a problem in connecting my flexgrid with my database

hello dears,

i faced a problem in connecting flexgrid with the data base.i am actualy successful to connect at building time but i want to connect the flex grid at run time by specifing the connection through codes.

i need a piece of vb6 code .please help me

thank u

sincerly ,
abreham
Aug 31 '07 #1
1 2091
QVeen72
1,445 Expert 1GB
Hi,

MSFlexGrid does not Support setting of DataSource to a RecordSet Object. U can Set DataSource thru a DataControl for this, which will be Design time.
If u want to connect @ run time use a "DataGrid" Or "MSHFlexGrid" (MS Heirarcheal FlexGrid)..
Code will be some thing like this :

Expand|Select|Wrap|Line Numbers
  1.     Dim RST As New ADODB.Recordset
  2.     Grd.Clear
  3.     sSQL = "Select * From MyTable"
  4.     Set RST = Nothing
  5.     RST.CursorLocation = adUseClient
  6.     RST.Open sSQL, adoCn, adOpenStatic, adLockReadOnly
  7.     Set Grd.DataSource = RST
  8.     Grd.Refresh
  9.  
REgards
Veena
Sep 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rage Matrix | last post by:
Hi all, I'm using Access XP 2002. I'm trying to put the control Microsoft Flexgrid 6.0 onto a form. However, whenever I try this, I get the following error..."You don't have the license required...
4
by: VR | last post by:
I am trying to embed a check box into a FlexGrid's cell, but having a problem when I start scrolling the grid. Here is my MyCheckBox class... class MyCheckBox : CheckBox { void Init (...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
9
by: JFB | last post by:
Hi All, I have a edit flexgrid, after to fill with different rows manually. How can I insert the rows of my flexgrid to my table (sql server) using ado.net? Any example? I can insert one row...
0
by: chirayushbpatel | last post by:
I use flexgrid control in my VB apllication but I cant get data from MS Access database, an error dispaly like "Unrecognized databse format" How can I get table data in flexgrid control
1
by: saiswarnalatha | last post by:
How to insert values into FlexGrid Control and save into database and retreive from database? How to pass values from one Flexgrid in one form to another Flexgrid in another form? Do reply soon...
3
by: panget | last post by:
I am supposed to create a form with a flexgrid that should display all contents of my database books.mdb. I also added a button called "Add" which when clicked should display another form with...
3
by: sweevil | last post by:
I'm converting a VB6 project to .Net2005. One of the items encountered was setting the cellpicture onto a flexgrid from an imagelist. The image background doesn't appear to render correctly. I...
3
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into a CSV file but even though the file is made none...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.