PDA

View Full Version : Parse textfile and update MS SQL tables



elj4176
June 4th, 2008, 08:38 PM
Looking for a language to use to parse a textfile with fixed length fields and update a MS SQL databse. I've done a bit of php and can connect to the db and get data but I have a feeling that is not the most effecient language to use for this and I'd rather it was not a web app.
I have VS.net 2003 but it will not allow me to connect to the MS SQL Server - only the MSDE.
Python, perl, bash, C++ - stay with php?
any suggestions (other than dumping the MS SQL server for mySQL)?

geirha
June 4th, 2008, 08:59 PM
I don't have any experience with MS SQL, but if php can connect to it, then you might as well use it. Php can be used in the shell as well as on the web server. A google search gave this as the first hit, which shows a simple shell script with php http://www.phpbuilder.com/columns/darrell20000319.php3

pmasiar
June 4th, 2008, 10:01 PM
pymssql.sourceforge.net/

ghostdog74
June 5th, 2008, 02:27 AM
if you are experienece in PHP: try this (http://www.php.net/mssql)
a web app has the advantage of a central location and don't have to redistribute your programs to users using VB

slavik
June 5th, 2008, 02:37 AM
pymssql.sourceforge.net/
sorry, that is a bad advice.

Use PHP from command line, or if you want, picking up Perl should be really fast.

elj4176
June 5th, 2008, 02:38 AM
thanks! I will have a look at those links.

This will be a 'quick and dirty' app just to save me some time. Anything i can use an odbc connection with will work too.

ghostdog74
June 5th, 2008, 02:50 AM
thanks! I will have a look at those links.

This will be a 'quick and dirty' app just to save me some time. Anything i can use an odbc connection with will work too.

yes, PHP can connect through ODBC as well. See here (http://www.php.net/odbc). In fact, google "PHP database" and you may find more info.