Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Area or no?

Status
Not open for further replies.

DANZIG

Technical User
Mar 8, 2001
142
US
Hellos,

I'm looking to add a few pages to our internal IT site that document some of our processes system to system interfaces ect. The majority of these interfaces are all scripted as a part of the documentation of the process I'm wanting to include the files and source code involved in each interface. The majority of the from entry would be simple information which is not a problem, its the source code that will be different.

I'm looking at two requirements

1. The ability to paste the raw source code in to a text field in the sql database.

2. Placing the the actual files currently inuse with in the database in a sourcefiles table much like an image table.


The problem with the raw source is that the cod can be as much as 8000 lines of code which would not work in a form submission as the url string would hit the 255 character limit.

The sourcefiles question is has anybody tired using that method of file incapsulation with in a table space before and did it seem to work well?

Am open to suggestions and input.




Thanks, Danzig
 
A form using the POST method would work... it's only the GET method that uses the querystring (and it's actual limit is around 2050 characters, fyi). With the POST method it can be as big as you want.
 
What about option 3?

Create a documents folder somewhere in the web directories.
Upload the files via a file input and upload script/component.
Append a Date/Time stamp to the front of the file (to prevent duplicate overwrites)
Save the new filename to the database as well as the old filename.

At this point it becomes simplicity itself to create a listing page and turn the output of the filenames into links, your not congesting your database with large files, and you have the ability to back the files up seperately from the database should it be necessary.

Storing files in BLOB fields is possible but I am generally against it. I prefer to use the database as an indexing service, keeps the db backup sizes down and means that when a codeveloper decides SELECT * is the proper way to get a list of filenames, the database won't eat the network alive.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top