SQl Codes

I am using MFC Visual c++ 6.0 .And i am using Sql server 
2000 to Access data.

I am using provider method and i don't know how to use SQl 
codes to retrieve records.

Would you like to give my one example please.

send me personnal message at
richard_mikobim@hotmail.com
0
anonymous (74722)
1/7/2004 1:15:30 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
468 Views

Similar Articles

[PageSpeed] 56

"Richard Mikobi" <anonymous@discussions.microsoft.com> wrote in message
news:0bbb01c3d520$52fc6bd0$a101280a@phx.gbl...
> I am using MFC Visual c++ 6.0 .And i am using Sql server
> 2000 to Access data.
>
> I am using provider method and i don't know how to use SQl
> codes to retrieve records.
>
> Would you like to give my one example please.
>
> send me personnal message at
> richard_mikobim@hotmail.com

What do you mean by 'provider method'?

Take a look at CRecordset and CDatabase in MFC. Check the MSDN.

Take a look at the following pages:
http://www.codeproject.com/database/
or
http://www.codeguru.com/mfc_database/index.shtml

Tom.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/7/2004 1:47:03 PM
>-----Original Message-----
>I am using MFC Visual c++ 6.0 .And i am using Sql server 
>2000 to Access data.
>
>I am using provider method and i don't know how to use 
SQl 
>codes to retrieve records.
>
>Would you like to give my one example please.
>
>send me personnal message at
>richard_mikobim@hotmail.com
>.
>


Hello,


http://www.codeproject.com/database/#SQL



With Regards,
R.Selvam

0
1/7/2004 1:55:40 PM
"TT (Tom Tempelaere)" <_N_OSPAMtiti____@hotmail.comMAPSO_N_> wrote in
message news:r5UKb.1825$Ob.231472@phobos.telenet-ops.be...
> "Richard Mikobi" <anonymous@discussions.microsoft.com> wrote in message
> news:0bbb01c3d520$52fc6bd0$a101280a@phx.gbl...
[...]
> > I am using provider method and i don't know how to use SQl
> > codes to retrieve records.
> >
> > Would you like to give my one example please.
[...]

> Take a look at CRecordset and CDatabase in MFC. Check the MSDN.

Also take a look at CDaoRecordset & CDaoDatabase.

You can also use ADO, which is (IMHO) a little more complex.
(http://www.codeguru.com/mfc_database/Ado_Aok.shtml &
http://www.codeguru.com/mfc_database/Ado_Aok_2.shtml has a good
explanation).
(http://www.codeproject.com/database/simpleado.asp)

Tom.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/7/2004 2:01:49 PM
Reply:

Similar Artilces:

Bug Rep: Excel 2007 .xlsm file not saving commented codes
since i've tested this agaist 2 different copies of Excel 2007 fresh install on different machines at home, i think it's clearly a bug. ok, in order to save vba codes now in excel 2007, i'd have to save files in the .xlsm format. that's cool. everything been working sweet, until... spent 4 long days busting my butt during the new year, missed all the nice parties to rush this stupid project out, and 2 hours being scream at by my boss over skype kinda ate my heart out. how can such a simple mistake be made? very very easy >:Errrrrrrr go on any sheet that has codes ...

Using A Macro/VBA code to re-set formulas
Hi can any one help me with a Macro/VBA code to re-set formulas in pre-defined set of cells i.e. in my case C14:C40 At present I have a copy of the Formulas in another part of th worksheet and when I want to reset the worksheet (as the user can ove right the formulas as the formula is based on either the sum of anothe two cells or the users input) I use a Macro to copy and paste (special the formulas. What I require is a Macro/VBA Code which already has the formula store in the actual Macro/VBA code i.e. so they are not stored as copy in m worksheet Ay help would be greatly appreciated T...

SQL setup RMS 2.0
I am setting up a new system with 3 registers (Win XP SP2), two back office computers (Win XP SP2 and SQL 2005 Express), and Windows SBS 2003 with SQL Server 2005 Professional. The problem: Can't get the back office workstations to connect to the SQL Server. I installed RMS on the server, it connects to SQL and run perfectly. When I try from the workstation using RMS Admin, I get a time out error. I did everything in KB932078 without success. Must be something very minor with major consequences that I've missed. Can anyone help? Thanks Rich -firewall -sql surface area co...

slow code
i've made a code that searches one optional column for duplicates and deletes 2-6 cells in the same row as a duplicate data is found. I'm using this code a lot and my problem is that it can take very long time for the code to run, it can take 1 hour or more if i'm searching like 15000 rows. I'm going to the last cell in my row and uses the countif command to determine if there are duplicates, if not then i go to the cell above and run an new countif. is there a faster way to do this? jocke ------------------------------------------------ ~~ Message posted from http://www...

Does SQL Run Behind Queries?
Access 2007 When I run a query does Access, "go away" and run the SQL for what I see in the GUI? If the answer is, "yes" is there anything that I can switch on to see the SQL that it is running? What I would like to do, if it is possible, is to see the query in the GUI and, at the same time, see the SQL that is being used to select the data from the database; that way I can understand things (exactly what is happening) more clearly and more quickly. TIA for any replies. trip_to_tokyo wrote: > Access 2007 > > When I run a query does...

An open on table 'ME_Direct_Deposit_MSTR' failed accessing sql data.
Hi.. We are on Dynamics GP 9.0 and we recently updated our GP with 'Advanced Human Resource and Payroll suite 9.0'. The update on the server and client computers went through good but when one of our user is trying to print a payables check its giving the following error message. "An open on table 'ME_Direct_Deposit_MSTR' failed accessing sql data." We initialized the database for all our companies by logging in as SA and accessing all the companies on server as well as client computers. Any idea what could have gone wrong? Any help on this one will be much appre...

Splitting code to modules ... HOW ?
I have build several Excel VBA applictions, but many of them use som same code and functions. I like to put the code into ONE base module. How must I create the module, export it ? And how to refer to it in al the programs I like to use the base module ?? Roel -- Message posted from http://www.ExcelForum.com Roel If the macros are in several workbooks copy them into the same book and save this as Personal.xls The personal workbook may not be visible when you start Excel but the macros will be available to all workbooks. Alteratively, save the macro as an addin e.g. "myFile.xla&...

Colour code from different servers
-- I collect mail from 2 different servers and I was wondering if it is possible to have them show in the IN BOX in different colours. I know I can select different senders by colour but I want to show all senders that came from each server. Can anybody help Pete A "Pete A" <PeteA@discussions.microsoft.com> wrote in message news:EB77DCA6-A07E-47E9-AD04-62C8B6BC1193@microsoft.com... > > -- I collect mail from 2 different servers and I was wondering if it is > possible to have them show in the IN BOX in different colours. I know I > can > select different se...

how do i change or make this macro??? pictures and code included
i need to either make this from scratch or change it to suit my needs. Firstly a link to the template it is from http://www.exinfm.com/excel%20files/FY2000WhatIf.xls the code is Sub projection() Dim revgrowth As Single, costpercent As Single, smgrowth As Single devgrowth As Single, gagrowth As Single Dim intincome As Integer, noncontitems As Integer, otherexps A Integer Dim taxrate As Single, avgshares As Integer 'dialog box gets displayed With DialogSheets("dialog3") If .Show = False Then Exit Sub End If revgrowth = .EditBoxes(1).Text costpercent = .EditBoxes(2).Text smgrow...

Hiding and Unhiding Forms In Code
This is what I am trying to do. I hide a form and opened another form using a button: Me.Visible=False DoCmd.Open "Select Report Type", acNormal Now I want to unhide the form again using a button on the second form, I tried: If Forms![Inscope Site Summary].IsVisible=False Then Forms![Inscope Site Summary].Visible=true End If But this didn't work. I am stuck. Any help will be greatly appreciated. Thank you. Here is an example of using the IsVisible property (straight from your friendly Access help file); If Me!CategoryID.IsVisible Then Me!Line0.Visible = Tr...

sql report 3 tables
I am trying to write a report which will contain 4 tables, I need to display all 4 tables on one page. Unfortunatley because of the siz of the first 2 tables the 3rd table sits way down on the right hand side, how can i manipulate were the tables sit on the preview window? Regards Ian Are you writing your report in visual studio? in Report layout view, right click outside of the report area and select Properties. from the second tab you can change the layout of the report. By default it is set to 8.5 X 11, try chaning it to 11 X 8.5. Also, try changing the font size in your tab...

CRM Moving Sql Server 2000 to 2005 (Database and report) new Serve
Hi, I'm working to move sql server 2000 to sql server 2005 on a new server. CRM 3 is installed on one server and Sql 2005 and Reporting Service on an other server. I backuped and restored the database succefully. But I have an issue when I produce reports. On some reports, I have the graphic with fields where "#Error" is display. Any idea? Thanks David ...

Extracting invoice data from GP 9 using a SQL query (ODBC)
I'm working to extract invoice detail information from a client's GP 9 MSSQL database, with the goal of being able to mock up their invoices in external systems. Just to keep things interesting, they aren't using GP to it's maximum ability - quotes are generated from another software package, and when converted to a sale, minimal data is entered into GP and processed (such as shipping address, job name, job number, PO number, and occasionally a line it of what appears to be free-form text. I have hard copies of several invoices, various web resources, and access to t...

Adding to a list of codes
Hi In Excel 2003 I have a spreadsheet listing a large number of cost centres. Each month I am given a list of the cost centres and expenditure against them, which I want to use a look up to populate in to a master spreadsheet. However, during the month new cost centres could have been created. What I would like to be able to do is run a macro against the monthly return and compare the codes contained in it to the codes already listed in the master sheet. If there are any new codes not already in the master sheet I would want them added to the existing list so that the mast...

Setting database location to SQL Server
Hello, I'm looking to move the POS system database from the local MSDE database to a SQL server. I've restored a recent backup (.bck) to a SQL server machine on our network and I'm looking for information on how to reconnect the POS to the new SQL server. Before we go live I will restore a new backup but I'm just testing the solution for now. The overall plan is to separate the database from the cash register and allow SQL server to perform backups and other normal database task. Is there a separate configuration tool for changing data connection information? ...

Outlook error codes
I would appreciate any help! Outlook 2007 refuses to startup, error messsage: catastrophic failure (0x8000FFFF) and the following: C:\Users\Matt\AppData\Local\Microsoft\Outlook\ Outlook.pst is not a personal folders file. error code now being displayed: 0x80040119 (is this a registry problem?) the above was the default folder and as such contains a large amount of my inaccessible data Have been unable to activate (or even locate) inbox repair tool (Scanpst.exe), which I understand was installed with Outlook have neutralized spyware uninstalled and reinstalled Outlook 2007, to no ...

bar code help, adding asterix to reference
Hi, A simple one im sure, cell b4 contains a number, i want cell c4 to display the same number with an asterix (asterisk?) at either side for my bar code font? ="*",B4,"*" What's the correct way to enter this? Many thanks as ever, Rick ="*"&A1&"*" seems to work after some trial and error, could there arise a problem doing it this way? Thanks, Rick "R D S" <ricknewsgroup@members.v21.co.uk> wrote in message news:352cf1F4gusjfU1@individual.net... > Hi, > A simple one im sure, cell b4 contains a number, i want cell c4...

Need Help with Delete SQL for Access
Hi, I have an MS Access Table that I use to store log information and it looks something like this: tblLog ID Job SN Message Date 1 script1 abc123 Failure 1/1/2007 2 script2 abc123 Failure 1/1/2007 3 script2 abc123 Success 1/2/2007 4 script2 def456 Success 1/2/2007 5 script1 def456 Success 1/9/2007 6 script1 def456 Failure 1/10/2007 7 script1 abc123 Success 1/10/2007 I would like to create a query that would delete all of the old information. In other words, I only want to keep the data from the last time the script was run. If I were going to select the data, I would use something like ...

SQL report as dashboard to filter for Current user cannot user CRMAF_ #2
First off I cannot use the default filters because the report is being generated for a dashboard and not a CRM Report, however it is being created via an SRS Report. I simply need a way to filter the report for the current user only, I found this query which gives the system user but this will not match up to the Account owner because of its format. select fullname from FilteredSystemUser where domainname = SUSER_SNAME() Gives: CRM Admin I need, Admin, CRM ...

which code for the SpellLang in English ?
Hi, I created an Excel file (XP/XL:2000) which is using the check spelling with the code : Range(Cells(19, 2), Cells(50, 9)).CheckSpelling SpellLang:=1033 I would like to know the valid number version for the SpellLang, according to the US language The number 1033 is actually valid for the french language of north America .... Fran´┐Żois I just ran a test using English and the Macro recording feature. It spit this out: ActiveCell.FormulaR1C1 = "spelling something wronge" Range("J6").Select Cells.CheckSpelling SpellLang:=1033 It would appear that 103...

Upgrading SQL Server 7 to SQL 2000 or 2005 concerns
Can someone give me some suggestions of upgrading SQL Server from version 7 to SQL 2000 or SQL 2005? Dynamics GP 9.0 is the only application running on our SQL server. thanks! -- Doug Doug, SQL 7.0 to SQL 2000 need to be upgraded using the upgrade tool that exist with SQL 2000 Installation, on the other hand, SQL 2000 to 2005 does not need any actions. Regards, -- Mohammad R. Daoud MVP, MCP, MCBMSP, MCTS, MCBMSS Mob: +962 - 79 -999 65 85 Great Package For Business Solutions daoudm@greatpbs.com http://www.greatpbs.com http://mohdaoud.blogspot.com/ "Doug" wrote: > Can s...

How list inventory item codes so that they will be sorted correctl
...

compiling unix code
dear group, i'm trying to compile code with visual C++ (visual studio 2003 dotnet). the code compiles fine on unix; would like for it to compile on vc++. first question: first, is there a gettimeofday() function on windows? i was under the impression that gettimeofday() is part of the POSIX specification and MS windows is a POSIX compliant operating system. shouldn't the function exist for vc++? second question: here's the top of my code: #define N 10 // Dimension of the matrices #define ITERATIONS 500 // Times to perform multiplication. #incl...

How to enter codes in excel and have corresponding payment sum ?
I would like to learn how to make an excel spreadsheet that I could enter codes and have the corresponding payouts sum up. I work as an installer for a cable company and each job I do consists of codes for work done ( i.e. code 250 -Ran 1 outlet= $8.25, code 251- ran 2 outlets= 16.5 etc..). I would like to be able to enter these codes at the end of the day and see how much I made that day. Is this possible? I know very little about Excel, but do have alot of computer savy. Please help :) The starting point would be for you to build up a table of codes, description and price, something ...

SQL Reports in Administration & Excel Crashing
I am using GP 10 and have recently deployed SQL Reporting Services reports in Dynamics. I have a problem when I go to access the reports. In GP 10 after going into Administration and Custom Reports, I get a message that Excel 2007 has crashed. I am not sure why since I am not trying to access Excel 2007 at that time and do not have it open. I realized that that is not an Excel forum, but hoping someone might know a solution due to how Dynamics is relating to Excel in this area that would cause this problem. I had Excel problems that seem similar to your's. I had an Excel...