| View previous topic :: View next topic |
| Author |
Message |
Ryan Schoolman Guest
|
Posted: Fri Aug 06, 2004 3:44 pm Post subject: file content |
|
|
how do you open the files contents with sql server 2000 using sql?
--
Ryan Schoolman - Programmer & Application Architect
[email]ryan (AT) infinitejoy (DOT) com[/email]
Infinity Software Solutions Inc.
http://www.infinitejoy.com
[w] 715.839.6855
[c] 715.379.0878
[h] 715.855.9003
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Fri Aug 06, 2004 5:02 pm Post subject: Re: file content |
|
|
Your question is not clear. What kind of file are you trying to open?
I assume it is something other than a SQL Server database.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Ryan Schoolman Guest
|
Posted: Fri Aug 06, 2004 5:56 pm Post subject: Re: file content |
|
|
Bill,
I am trying to read in the contents of say an exe or zip file and than
return the results from a query.
"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote
| Quote: | Your question is not clear. What kind of file are you trying to open?
I assume it is something other than a SQL Server database.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Fri Aug 06, 2004 6:06 pm Post subject: Re: file content |
|
|
I am not a SQL Server expert but as far as I know there is no way to
execute a SQL SELECT against a binary file.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Ryan Schoolman Guest
|
Posted: Fri Aug 06, 2004 6:16 pm Post subject: Re: file content |
|
|
I was just wondering if you knew of a command that is like
EXEC sp_readerrorlog 1, 'C:temp.text'
"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote
| Quote: | I am not a SQL Server expert but as far as I know there is no way to
execute a SQL SELECT against a binary file.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Fri Aug 06, 2004 8:04 pm Post subject: Re: file content |
|
|
I do not but that does not prove much.<g> There are lots of folks here
who know SQL Server better than I.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Igor Gottwald Guest
|
Posted: Sat Aug 14, 2004 12:34 pm Post subject: Re: file content |
|
|
I am afraid you will have to write your own user defined function.
It is not very difficult, but read the documentation carefully.
The function van return the BLOB data, but I am not sure if it can return
more than 8000 bytes.
If not, you will have to return the content in several chunks and use
TEXTPTR function / UPDATETEXT command.
I have no experience with returning data by user-defined function, but
writing a DLL expanding the server with two functions sending SMS (through
attached mobile phone) and e-mails was about three hours work.
Regards, Igor Gottwald
"Ryan Schoolman" <ryan (AT) infinitejoy (DOT) com> píše v diskusním příspěvku
news:4113a671$1 (AT) newsgroups (DOT) borland.com...
| Quote: | how do you open the files contents with sql server 2000 using sql?
--
Ryan Schoolman - Programmer & Application Architect
[email]ryan (AT) infinitejoy (DOT) com[/email]
Infinity Software Solutions Inc.
http://www.infinitejoy.com
[w] 715.839.6855
[c] 715.379.0878
[h] 715.855.9003
|
|
|
| Back to top |
|
 |
|