rachelreese's blog

One Rachii's take on .NET, Phoenix, and some unrelated, potentially completely random things.

April 2003 - Posts

More Clippy. :)

Hey cool! Dan Wahlin's set up a neat utility with Merlin & XML, to help teach kids to read:

http://www.xmlforasp.net/codeSection.aspx?csID=91

 

Posted: Apr 28 2003, 09:53 AM by rachelreese | with no comments
Filed under:
DTS Packages & Text Files don't play nicely. At least, not when *I* ask them to.

Hi Folks,

After just lurking for so long, and rabidly reading what everyone else has to say, I figured it was time for me to step in. 

And I have a problem that Google can't seem to solve. 

I created a DTS package that copies a text file into a database using the wizard, saved as VB, and upgraded to VB.NET (using http://www.sqldts.com/default.aspx?6,104,264,0,1.)  If I run the package as soon as I create it, from within SQL Server, it works perfectly. 

However, I'd like to run the DTS package from a windows service upon discovering a new file in a directory. I have the windows service all set up and working (side note: must talk more about the ease, practicality and general amazingness of windows services!) calling the .bas file as needed... but it fails every time, with the following:
-------------------
Package Steps execution information:

Step 'Copy Data from TheTextFile to MyDatabase Step' failed

Step Error Source: Microsoft Data Transformation Services Flat File Rowset Provider
Step Error Description:Incomplete file format information - file cannot be opened.
Step Error code: 80004005
Step Error Help File:DTSFFile.hlp
Step Error Help Context ID:0

Step Execution Started: 4/22/2003 12:20:46 PM
Step Execution Completed: 4/22/2003 12:20:49 PM
Total Step Execution Time: 2.937 seconds
Progress count in Step: 0
-------------------

I found several posts to the microsoft.public.sqlserver.dts group, but none that solved the problem:  I'm already using SQL Server 2k; and, I need to pass the DTS package the name of the file to import, so I can't run the package from SQL Server itself.  (I did check and the name of the file is being successfully passed.)

Anyone have any ideas?

Microsoft KB article #261186

OK, OK, Scott Hanselman already blogged on it, but I couldn't pass up the opportunity to pass this one on...

Microsoft KB article #261186: Computer Randomly Plays Classical Music

Go figure.

Clippy

OK, OK, you asked for it!

Check out: http://www16.brinkster.com/rachelreese/merlin.aspx 

The code is just JavaScript, so feel free to view source and steal all you want.  (oh, and uh, don't click around the site... I'd say a full 79% of the links are broken.  Or if you do, be warned. )

<history>
It all began as a joke on my manager... he had the nerve to ask for a help section to my perfectly designed and completely user-friendly application.  Hrmpf.  It now looks like we might actually implement this guy in our live version of the app.  Fooled me, didn't it?
</history>

By the way, I know some of you folks played around with this a little... any stories?

WinForms Beginnings

I got the chance this week to develop a fun little (read: dinky) app that takes the place of the "Copy project" option in VS.NET.  Because if you want to publish only one file to your live server, you have to sit there and click, "no, don't copy" for all the rest of the files relevant to the project.  Or manually copy and paste in Windows Explorer, and risk forgetting that you also updated a class that's really stored in your business logic in some other folder.  Ugh. 

So, I set up a windows service that monitors my local development directory for all updates, and (through a sproc) writes the name of the file (excluding _vti_cnf and other such unnecessaries) and the last time it was updated to a 2-column database.  (Time: couldn't have been more than 10 minutes)

Then, a WinForms app: it gives you a datagrid with checkboxes, to just check the files you'd like to publish up, and the option to 1) choose from a dropdown list, or 2) browse to the location of, the servers that you're moving to/from.  You hit a button, and voila! it copies over three files that you selected, and no more.

So, in my really short time with Winforms, I learned a few key things:
- WinForms Datagrids are completely different from Web Datagrids.  Grumble; Grumble; Grumble.
- Use & abuse George Shepherd's FAQ.  It will have everything you need.  Even things you didn't know you needed.
- Knowing how to implement new technologies that your co-workers (pure web folks) didn't do first makes you cool.

More Posts