Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Enumerating data formats currently available on the clipboard
Winsock: sending email messages (SMTP, port 25)
Custom FTP Class for Visual FoxPro application
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to activate Windows Calculator
Splash Screen for the VFP application
Custom HttpRequest class (WinHTTP)
Custom HttpRequest class (WinINet)
Using Font and Text functions
How to play AVI file on the _screen
Mapping and disconnecting network drives
Establishing connection using the SQLDriverConnect
How to convert a bitmap file to monochrome format (1 bpp)
Deleting files into the Recycle Bin
Displaying bitmap using the AlphaBlend function
How to display the Properties dialog box for a file (ShellExecuteEx)
Using EnumPrinters function to enumerate locally installed printers
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
If _TALLY works perfectly for SQL statements executed on local tables, it can not be applied for statements performed against remote data sources.

This code shows how to use SQLRowCount function, which is fully supported by Visual FoxPro ODBC Driver.
 
  Members area. Log in to view this example.
 
  User name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1872 bytes  
Created: 2003-07-17 14:28:52  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 83  
Listed functions:
SQLExecDirect
SQLGetDiagRec
SQLRowCount
Printer friendly API declarations
My comment:
The SQLRowCount requires a connection handle as a parameter. Such handle can be obtained by calling FoxPro SQLGetProp() function like this:
        hStmt = SQLGetProp(hConn, "ODBChstmt")

where hConn is a connection handle returned by SQLConnect() function.

I could not get a valid response from the SQLRowCount in combination with native SQLExec() function. All the way I got ODBC error SQLSTATE=S1010 (Function sequence error). I use VFP 6, so I may expect it works properly with a newer FoxPro version.

After switching to ODBC API function SQLExecDirect the SQLRowCount immediately started to work, returning number of affected records for my UPDATE statements.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.234.67.55)
3.45 hrs.Example: 'Current keyboard type'
4.03 hrs.Function: 'InternetTimeToSystemTime'
Function group: 'Internet Functions (WinInet)'
5.53 hrs.Examples
 Function: 'waveInGetNumDevs'
 Example: 'Testing an ODBC connection for supporting specific functionality'
5.65 hrs.Function: 'GetMenuItemCount'
Function group: 'Menu'
9.4 hrs.Example: 'How to make a VFP form fading out when released (GDI+ version)'
 Function: 'waveOutUnprepareHeader'
Function group: 'Windows Multimedia'
 Example: 'How to retrieve number of objects in the Recycle Bin'
17.67 hrs.Function: 'accept'
Function group: 'Windows Sockets 2 (Winsock)'
Google
Advertise here!