December 3, 2002 at 2:09 pm
How can I get raw data from the database without any meta data.
December 3, 2002 at 3:48 pm
I am not sure exactly what you mean. Can you explain to us what you are looking for?
December 3, 2002 at 3:56 pm
do you mean without headers? You can use DTS to grab data out.
Steve Jones
December 5, 2002 at 5:59 am
I have a structure which exactly matches the DB row, so if I am able to get the raw data directly I can just copy it to my structure instead of copying each column. I need to do this in my application. Can I use ADO to do this ?
December 5, 2002 at 7:14 am
quote:
I have a structure which exactly matches the DB row, so if I am able to get the raw data directly I can just copy it to my structure instead of copying each column. I need to do this in my application. Can I use ADO to do this ?
SQL Server doesn't work with raw data. That's one of its strengths, believe it or not. SS hides the raw nature of your data and presents and converts it as needed/requested.
If you want to insert data you can use BCP or the old INSERT statement. You can use ADO but then you have an application to maintain. If you have lots of data, BCP. If you are processing rows upon request it sounds like you have an application.
December 5, 2002 at 8:07 am
My understanding is that SQL Server sends the raw data and the column information like the name of the column etc which is used by the client applications to display. Is that not correct.
December 5, 2002 at 8:14 am
Yes, SQL Server does, but through the Tabular Data Stream protocol (also used by Sybase). If you look at a network frame you'll see the raw data. But this isn't how it's stored in SQL Server.
Also, TDS is unpublished. There is an open source effort going on at http://www.freetds.org/ but it's probably not going to tell you how to take raw data and make it available to your app. The APIs and source code deal with the TDS protocol.
Why can't you make an open connection to SQL, retrieve the data through ADO and load your structure? I guess another question is what is your structure doing that a disconnected recordset couldn't?
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
December 5, 2002 at 4:00 pm
Besides on the row level I believe varchars physically vary and there is a pointer object to define next column. So unless all your data does not use any of the variable length types a raw could never match your strutucre exactly. But again as Brian states you can call into an app and pad it as needed to overlay on your structure and save. You could even do a script job or DTS package to handle it on a regular basis.
December 6, 2002 at 5:32 am
Previously we used an ISAM DB, I am trying to migrate to SQL server with minimal changes.
I have all the DB access done in a DLL and other applications call this DLL to get the data. The data is transfered between the App and the DLL through data structures. I guess there is no easy way than to copying individaul columns into the data structure.
Thanks for all the help.
December 7, 2002 at 10:10 pm
No I don't know of a way based around what you are proposing. However, you might try exporting to a text file in fixed width columns based on the data struture then use the Import Wizard in SQL to pull the text file in.
Edited by - antares686 on 12/07/2002 10:11:33 PM
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply