how to show data into datagrid from a database in sql server

Hi

i have made a dialog based application in vc++ , placed a datagrid on
it and used some code in initdialog function to make database
connection with sql server.now my problem is how to retrieve data into
the datagrid.......i dont know which properties to use.....and the
required codes....please if somebody could help on this..

thanks in advance

0
2/9/2007 4:04:46 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
411 Views

Similar Articles

[PageSpeed] 35

On Feb 8, 11:04 pm, "meg1" <megha.2...@gmail.com> wrote:
> Hi
>
> i have made a dialog based application in vc++ , placed a datagrid on
> it and used some code in initdialog function to make database
> connection with sql server.now my problem is how to retrieve data into
> the datagrid.......i dont know which properties to use.....and the
> required codes....please if somebody could help on this..
>
> thanks in advance

You can use CRecordView.  If your grid control is 3rd party control
obviously you have to programmatically invoke their APIs.

0
2/9/2007 4:19:24 AM
Reply:

Similar Artilces:

Access 97 can't resize database window
My database window with the listings of forms tables etc was adjusted to a smaller width, but resizing it is completely disabled and renders Access 2007 utterly useless for me. Is there anyway to 'reset' the window? ...

Showing zero in specific cells
As a general rule I do not want zero's to visibly show in the sheet, but in one specific column where the (pecentage variance) results of a calculation show I need to see these results; positive, negative and zero if applicable. How can I set up that these specific cells will visibily show a zero? Select the sheet and format as General;-General; then select the cells that you want to show zero and use General if you use percentage you the same, semicolon tells excel positive;negative;zero -- Regards, Peo Sjoblom (No private emails please, for everyone's benefit keep the dis...

exporting outlook 2000 pst files to a database
I need to export outlook 2000 to a database- attachments and all. Is there a simple way to do this so you can search and retreive messages and attachments in a database form? Thanks Jeff You can export individual folders to access or excel to have them available for searching. I have never tried to export my entire .pst file to access or excel however. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Jeff <laacid@yahoo.com> asked: | I need to export outlook 2000 to a database- ...

Running a SQL command
Hi, I need to update a record on a ms access database from MS Excel (Office 2000) I dont need nor i want to open the ms acesss db This is the sql command "UPDATE DB_ToolSheet SET DB_ToolSheet.HasChanged = 'Yes' WHERE [DB_ToolSheet].[ToolSheetID]=" & Sheets("Data").Range("A1").Value;" I hope someone can help me with this function I am new using MS Excel Thank you all, Bre-x Sub InsertData() Dim cnn As Connection Dim ConStr As String, Sql As String ConStr = "Driver={Microsoft Access Driver (*.mdb)};" & _ "Dbq=...

Showing 0 after decimal with ROUND
Hi, I'm using the ROUND function like this: =ROUND(C29*(92%),1) &- ROUND(C29*(108%),1) Unfortunately, if the numeral after the decimal is a 0, then it doesn't display. How can I force a 0 to display after the decimal? Libby Format the cell as Number with 1 decimal place - it would appear to be formatted as General. Hope this helps. Pete On Dec 4, 1:44=A0pm, Libby <Li...@discussions.microsoft.com> wrote: > Hi, > > I'm using the ROUND function like this: > > =3DROUND(C29*(92%),1) &- ROUND(C29*(108%),1) > > Unfortuna...

Monitor Server in 2003?
Hi all, After installing Exchange 2003 SP1, I'm having some issues monitoring exchange server via scripting. 1. I can no longer get any instances from "Win32_PerfRawData_ESE_DatabaseInstances" via scripting. 2. The property "LogGenerationCheckPointDepth" does not even appear as a property of "Win32_PerfRawData_ESE_DatabaseInstances". (I checked this with WMI CIM studio) I can still get the LogGenerationCheckPointDepth from performance monitor. The following code verifies what I've seen in WMI CIM studio: set RawProc = GetObject("winmgmts:\\r...

100% stacked column chart shows wrong information
I wonder if someone can help me. I have created a table that tracks the profitability of a particular project and I’m using the table as a source for a 100% Stacked Column graph. The source data for the graph is in three rows: • B21:M21 - contain the names of the months from Nov – Oct • B22:M22 - money taken in • B24:M24 - profit B23:M23 contains the money paid to supplier each month. I need this in the table but I don’t need to show it in the graph. I just want to show profit as a proportion of what we bill to customers on that project. My problem is that the graph seems to show in...

Statistics Creation on SQL 2005
My db has "auto create statistics" on. For some reason, there are quite a few indexes that don't have statistics. What could be the cause? Thanks in advance Sorry about the bother. I got my answer. "auto create statistics" proces only creates statistics if columns are found in where clause. "RG" wrote: > My db has "auto create statistics" on. For some reason, there are quite a > few indexes that don't have statistics. > > What could be the cause? > > Thanks in advance > My db has "auto...

publisher. why does webpage preview show only half page
When I'm viewing my webpage design in webpage preview I am getting a large empty space on the right hand side and bottom of the page On Fri, 17 Feb 2006 17:50:02 +0000, yousane wrote (in article <65E39911-B9CA-4785-BD48-358D03F3695A@microsoft.com>): > When I'm viewing my webpage design in webpage preview I am getting a large > empty space on the right hand side and bottom of the page And your problem is...? That's how it's supposed to be. Web pages designed in Publisher do *NOT* fill the entire screen. I suggest you learn to use the right tool for the job (I&...

Multiple domains on one Exchange server / All but one domain shows up as spam #2
I am sorry if this is on the board somewhere but I have been searching forever and havn't found a hint yet. I have multiple domains setup on my exchange server. Lets say abc.com, def.com, and hij.com. We only send email with @abc.com but can receive from any domain name. Recently we merged with another company and we brought back their email to our server, lets say xyz.com. Now I configured a new recipient on Exchange 2003, so I now have two policies. The first policy has the three original domains in it with @abc.com as the primary domain. In the second policy I have configured xyz.com t...

Can the data in a chart table be right justified?
Ecxel 2003 and previous versions of the product center the data in the data columns. Can the data in the columns of a chart table be right justified? In article <DABF738B-6C0D-458B-B082-FA9BD8F126A7@microsoft.com>, =?Utf- 8?B?c2FtIGVhZ2xl?= <sam eagle@discussions.microsoft.com> says... > Ecxel 2003 and previous versions of the product center the data in the data > columns. Can the data in the columns of a chart table be right justified? > Have you tried to format the table? If yes, and you haven't been successful it is probably because XL allows very limited cust...

Outlook Mail via a PROXY SERVER?
If I am using a shared Internet service on a second computer using a PROXY server on the host (first) computer. I can access the net using the PROXY settings on the Internet explorer. However, how do I download mail with OUTLOOK 2000? The proxy server is CCPROXY from YoungZSoft (this runs on XP) and it has the MAIL Settings enabled but the difficulty is what to do on the Second computer? Thanks, -- John jrg_REM_SPAM@bigpond.net.au That would be determined by the proxy manufacturer - check with their support. JM7 wrote: > If I am using a shared Internet service on a second computer ...

Data migration - Adventure Works
Hiya... I have a company where the adventure works db has been used and had a lot of data populated into the system. We have now purchased MSCRM and have obtained the company reg keys. What is the easiest way to get the data from the 1 system to the next? We will be establishing a new AD domain and users for the new system.... Data Migration Framework? Redeployment Framework? ;) redeploment tools http://www.microsoft.com/downloads/details.aspx?FamilyID=bfced393-61db-49af-9a50-4a90b311fa7d&DisplayLang=en -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "funboy...

Backing Up Exchange Database
Hi I am running Exchange 2003 on a Windows 2000 server. Veritas Backup 10, is installed on the server. The Exchange Agent is also installed on this server. A full backup with the option to clear committed logs is used to perform the daily exchange backups. I noticed that in the MDBDATA folder the logs are continuously being added approximately 5MB in size. Is there a way to have these logs removed automatically as I thought that the backup would perform that function. Thanks On Thu, 5 Jan 2006 17:18:02 -0800, microsoft <microsoft@discussions.microsoft.com> wrote: >Hi >...

Label a chart of counts with other percentage data
Here's the data: Group 2005 2006 2007 LTM Data A 19.4% 22.8% 21.2% 19.9% Profitability A 6 7 7 7 Count B 9.5% 31.6% 30.4% 30.7% Profitability B 2 3 3 3 Count C 22.4% 23.6% 16.6% 17.6% Profitability C 15 16 17 18 Count D 19.2% 20.5% 15.9% 13.7% Profitability D 8 8 9 10 Count I have successfully generated a stacked bar chart that shows the counts per group by year. Now I would like to include a label for each group to show profitability for each group in each year in the 4 stacks. How would I do that? Thanks, --...

Creating a chart based on the data in an embedded worksheet
Hi, I have a worksheet with several embedded worksheets. I would like to create a chart based on the data of one of the embedded worksheets without putting the chart in the embedded worksheet. I have tried unsuccessfully to do this. I just wondered if anyone knew how to do it. Thanks, JK JK - You're embedding worksheets within worksheets? Why? Why not just insert the worksheets in line with the main worksheet? To open or edit the embedded worksheet, the parent Excel has to open another instance of Excel, and the chart on the outside of this other instance will never be able to acce...

SQL Server Connection Failed
Hi everybody, this is my scenario: 1. Windows Server 2008 2. WSS 3.0 + MOSS 2007 3. SQL Server 2008. i'm having this problem: "Login failed for user 'sa'. Reason: An error occurred while evaluating the password. [CLIENT: 72.55.191.137]". in this momment i can't see any application from sharepoint. somebody knows how can i do? i don't change the sa password. i don't change anything in the sharepoint configuration. since two days ago i'm having this problem. pls, is very urgent, because i have to deliver this server the next monday to the...

Exchange server crashed, please help....! Need to restore two priv.edb and pub.edb files into one....!
Hi Guys, I was wondering if I could get some help with the following problem we are having on our company. Here is the scenario; Our Windows NT 4.0 SP4a server running Exchange 5.5 SP4 crashed (Server 1) due to the exchange database reaching its 16 Gig's max limit. I went ahead and moved some mailboxes' e-mails to a few .pst files in order to make some space. This worked ok. Then, I decided to build another exchange server (Server 2) to moved some mailboxes and alleviate the load. Once the server was ready and configured as part of the current exchange site, I went ahead and move...

Changing ip address of exchange server #2
Hi, I have a back-end server and a smtp server in DMZ. I want to change ip address of back-end server. are there any issues? all incoming and outgoing emails are going via smart host. Hi, No issues at all as long as you remember to change all the references to this server in your firewall, SMTP scanner etc. Leif "Jack Dorson" <JackDorson@discussions.microsoft.com> wrote in message news:FE5927A1-D20D-4C6B-991F-2E1EFD19434D@microsoft.com... > Hi, > > I have a back-end server and a smtp server in DMZ. > > I want to change ip address of back-end server. are ...

Backing up databases on remote SQL
Hi, I recently followed one of the MS articles on how to move GP 9 sql database to a different server. Everything went well except when trying to run the backup option from the GP9 server. I currently have a server with GP9 installed and another server with SQL and the GP databases. When I try to run the backup from the backup option on the GP server it says " You must be on the server machine to perform this task". presume this is because the SQL is no longer on that server. The SQL server has a backup routine of its own, but I would like our finance users to have the ability...

Outlook, Palm Pilot, and Exchange Server
I'm using Outlook with an Exchange Server (2000 Small Business). I installed the software for the Palm Pilot and now it prompts with a dialog box for the user to chose the following when they reply, forward or reply to all on an e-mail message. A Program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No". Allow access for (if you check the box) it gives 1, 2, 5 and 10 minutes. If you say no it lets you reply, forward, and reply to all. This is a nuisance more than ...

Migrating Exchange servers
We are in the process of migrating to a new exchange server. The issue we are having is transfering the user's outlook (xp, 2k) address book/contact list to the new server without manually having to log into everyone's computer and pointing their address books to the new server. Is there a way to do this authomatically server-side? You're moving the mailboxes, right? The user's "address book" is the Contacts folder in the mailbox. So, there's nothing extra to move. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for ...

Items for review wont show up
I am using MS Money 2004 Small Business. My checking account balance is downloaded each day from my bank. For the last couple days, it continues to download transactions, and tells me that there are now 8 items to review, but when I open up the account, nothing is bold faced to review. On the pane to the left, it still lists 8 items to review. I even went to the bank website and downloaded in the most recent transactions, but this only made the list of items to review larger. I still can't accept any of them. I have tried a quick repair. I also tried restoring the back up, bu...

Data validation list from another worksheet?
Is it possible that the value list for data validation be populated fro another worksheet? Puneet Aror -- puneetarora_1 ----------------------------------------------------------------------- puneetarora_12's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1840 View this thread: http://www.excelforum.com/showthread.php?threadid=38572 Sure is! Use a named range as described here: http://www.officearticles.com/excel/drop-down_using_data_validation_in_microsoft_excel.htm ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "punee...

"external data sources" and "external data ranges"
what is the difference between these? i have run the vb macro code on http://support.microsoft.com/kb/330383 to check if i have any external data sources or data ranges but there are none. the reason i need to know is becuase i'm working with office sharepoint server 2007 and i cannot access a file thru the web access web part because it says: "The workbook that you selected cannot be loaded because it contains the following features that are not supported by Excel Services: External data ranges (also called query tables)" anyone? thanks ...