Quantcast
Channel: SCN: Message List - SAP Advantage Database Server
Viewing all articles
Browse latest Browse all 997

Re: Is there a list on how to set up ADS for Windows Server 2012?

$
0
0

Mike:

 

Not every time.  We only had issues when creating a new table, or in our housekeeping routines when we created a blank new table to copy over all records from an old or damaged one.

 

So mainly, after creating a new table we closed it then called the winapi flushbuffers.

This C code sample is for the Harbour compiler we use, but you should get the gist of how to apply it to your own environment

 

HB_FUNC( FLUSHFILEBUFFERS )

{

   HANDLE hFile = CreateFile( hb_parc(1), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH, NULL );

   hb_retl( FlushFileBuffers( hFile ) );

   CloseHandle( hFile );

}

 

there's no validation that the full path to the file to flush is passed as the only param.

 

FlushFileBuffers( "c:\somewhere\abc.adt" )

 

HTH


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>