on 09-12-2008 11:36 AM
Dear All,
I Would like to know is it possible to store a .txt file in SQL Server 2005. if so can u please explain me the procedrue and query to do it
Regards
Tamilarasi
Technical Consultant SAP Business One
What do you want exactly?
Create on sql server txt file through TSQL? or Store txt file on server?
If is it the seccond option (store existing file), you should store it in field as binary type.
Let me know
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
...hmm...my gut feeling tells me that it could be not a good idea to store files of unknown size in DB because of DB-Performance - even when theres a way to do it. But maybe I'm wrong with that.
What about...
1. ...a DB-column of type db_Memo (if 64000 characters are enough...)?
2. ...or creating a folder on B1_Shr where the Textfiles are moved to and only store the (unique) filenames in DB the folder actually contains?
No. 2. needs some logic to keep the folder and DB-entrys always in sync.
Just my thoughts...
ok, Im not sure if I understand you correctly, but Ill try explain all ways:
You have for example file file.txt
1. You could store this file somewhere and to db write just path to this file.
2. You want store the textfile (inside datas) into db structures as
insert into table (file) values ('all datas what are inside the file') - the file column must be text or binary type
3. create directly on sql server text file - look at http://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql...
hope it helps
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.