Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to move data into a SQL-Server database?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00540114
Message ID:
00540669
Views:
20
>>Larry,
>>
>>Thanks. I can always count on high-quality tech information from you.
>>
>>>>If you really want to get down and dirty, check out this link (http://msdn.microsoft.com/library/en-us/oledb/htm/oledbabout_the_ole_db_documentation.asp). You would need to implement your connectivity via the OLEDB provider for SQL Server. Of course, you could always use ADO as George suggested because it wraps this functionality for you already into a COM interface.
>>
>>As I said in my reply to Hector, I'm trying to find out if I can write directly to SQL Server with low-level file IO calls. I'm getting the feeling that I can't (which doesn't really suprise me) but either way, I'm getting my answer.
>>
>
>Thom,
>Thanks for the compliment. :-)
>
>It sounds as though you are looking to write directly to the MDF/LDF file. No joy there. Without breaking into MS, I don't know where you could get the structure of those files in order to do it successfully. The key word is successfully.
>
>The structure to the DBF is readily available and you could conceivably do it using Fopen/Fwrite/Fclose (or the C++ equivalents) but you would need to do the same things in C++ that the VFP internals already do (append information to end of file, change header bytes to reflect new record count, etc.).
>
>The same is true for SQL Server. You either have to write your own OLEDB provider or use someone else's. Either way, you have to go through the same SQL Server interfaces exposed for these purposes because there is alot gonig on when you insert into SQL Server (logging, transactions, master tables updated if certain column types exist, etc.). The exposed interfaces interact with the non-exposed to handle this stuff.
>
>Good luck!
>
>BTW, here is another KB article to take a look at. It gives you C++ source code to handle large amounts of data. http://support.microsoft.com/support/kb/articles/Q246/2/62.ASP


Larry,

Pure speculation on my part here, but I'd think that if either ODBC or OLE DB were used, that would provide a far bigger bottleneck than the string parsing.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform