This is an old VB6 app, which will be replaced real soon, but I need to change the mode in run time to download files in ASCII mode. I know that the default is ASCII, but of late, our firewall is so unstable or should I say the people managing it. Some days our files come down in binary, the next its back to ASCII.
Our company is administered by a big corporation with 22,000 people. For me to try and attempt convincing them that this JV with only 500 odd people needs it to always be in ASCII is as much as asking pigs to fly!
I tried ftpINET.execute ,”ascii”
but it just loops, it never finishes the command.
Any ideas would be extremely helpful.
When I first came across the term code generator, I could not believe that people would actually generate code for applications. I mean why the hell do I have a job them... I am a walking, talking, coffee drinking code generator - and I can make vodka jellies if you ask me very nice.
Thus I have never really paid much attention to this. I've almost forgotten about it, then Hilton mention something about their code generator the other evening, and behold: This month's CODE magazines got an article on how to build a Stored Procedure Generator.
The demands have increased, the resources decreased, and I am beginning to think more and more about this. It actually makes good business sense to be honest. If you thing about it - the whole idea of IT/S is to empower people. But business is changing so quickly and the technology even faster. And if you want to keep on top of things, and give your business that leading edge on the market, you need more and more IT staff to do this. But IT staff costs money. Yeah Yeah. I know we LOVE to think that we actually make money or help the business save money, but lets be honest - we're an expense!
SO, the me with less time on my hands and more work than I know what to do with, and still ideas to empower users suddenly realised: Hey this code generation thing might just not be such a bad idea.
OK, so because I've decided to do the death dumb and blind on the subject, I know NOTHING. The obvious start will be a google on Code+Generators... but I would like to hear what you guys are doing. How are you tackling this issue, did you write inhouse software, did you buy something of the shelf. Do you hate it, do you love it? Any ideas or thoughts?
I am extremely excited about this tool. DTN Corp has created a tool that communicates with your visual source safe database from the Query Analyzer environment. We’ve had a bit of red tape to go through after I’ve seen it in ‘n SQL Junkies newsletter about a month or so ago, but finally got to install the demo today.
I had a few questions, and emailed their support. I was phoned back within the hour from the USA! They have a very nice Flash demo on the site too, if you want to have a quick squiz.
The application is a service that runs on the client pc. When it’s started, you open your Query Analyzer, select the database you want to work with, set it up, and voila, no more T-SQL script versioning nightmares!

Requested by Sascha, the Cape Town SADeveloper leads presented on Data Access in .NET – i.e. ADO.NET (By the way, thanks for pushing the topic Sascha!!!). May be I need to correct myself – Rudolf presented, but was interrupted by Hilton, Jannie and Angie… ;o) And Hilton entertained us with some artwork to support Rudolf's dabbling.
There were as many leads as there were members – 4 of us vs. 4 of them… ;o)
But it was a great session and again, I’ve learned so much – there is just so much that I take from each of these sessions, and it was so cool to have all 4 leads bless us with their presence last night.
Those that have not been to these, make a plan – we are really learning a lot. The coolest thing is that you can ask the dumbest question ever and nobody laughs at you. For those of you that’s been here before but weren’t there last night: Where the hell were you?
If I am not mistaken the next session will be on the 5th of September 2005. Keep a look out for it on www.sadeveloper.net

Check out Lift 2 work.
I have had all kinds of fun and games yesterday. Apart from the trading Citrix server throwing a couple of antics, because it could not resolve the database server name (residing on a different domain), and making a whole host of stuff live, that then did not want to work, I’ve also had to deploy my first .NET application.
I have heard somewhere along the grapevine that deploying an application in .NET is suppose to be as simple as copying the .exe and .dll’s to the client accessing it and voila, there you go. It appeared not be the case in for this application.
So, I learned about creating Setup and Deployment Projects. I did not know of its existence, until Ernst gave me a .NET 102 solution to deploying applications. I did a quick Google, and came across this link.
I have now managed to create an installation for my application, and it now works 100% on the client pc in question and I did not even break a sweat!
Read how to do it here.
Ok, so the first .NET app has to be deployed to 1 other pc. As I understood it, that if the other machine is running the .NET framework, I can just copy the .exe to the pc?
The pc is running the same OS (XP SP2), and I've installed .NET Framework 1.1 - but no cigar.
Any suggestions.
Oh, and I'm looking for a package and deployment app any suggestions?
The older I get, the quicker my childhood memories are starting to fade. But there are a few principles that my parents taught me, that stay with me. The first and clearest lesson is one that was taught to me by my father. He was swinging me on our makeshift swing in the back yard: Think before you say something. Think of the impact your words are going to have on the person you are saying it to…
The second is a lesson from my mother: Balance = a healthy/good life. This is something that has left me tossing and turning into the darkest hours of the night, every time I come to a crossroad in my life.
In this month’s edition of Insig magazine, Joan van Zyl investigates how to balance work and personal life. Apparently a balance lifestyle is myth of the 80’s (no wonder my mother is so frantic about it. I am convinced that she is stuck in that decade).
Researchers say that we have to look differently at balance: Anything that is important deserves our full attention and time. Sometimes it your family other times it is work, but when you are at work, you full attention must be at it, and when you are at home, you full attention must be with your family. Balance doesn’t happen in a day, but rather over a period of time. The plus of balancing things out, leaves us to build more flexibility into our 24/7 lifestyles.
Gerrie de Villiers, an executive coach, has the following pointers on how to survive a 24/7 lifestyle:
· Learn to say no
· Know your limits
· Have a good sense of humor
· Delegate
· Reflect from time to time
I have the following problem though – I have many passions. I love technology, but I am also a writer and philosopher at heart… I have a keen interest in wine… I love sports, I love my friends, and I love my husband. But after reading Joan’s article, I realize that I don’t have to be or have all of these things all in one day. My husband and I go on a date once a week. An appointment that sticks no matter what, and only involves the 2 of us. We have a fixed appointment with our friends once a month – we’ve started a dinner club… and I make a point of doing a wine tour at least once a term. The rest of the time I can juggle between my poetry and technology fetish.
Joan comes to the following conclusions on how to live a balanced lifestyle:
· Have a life plan
· Be flexible to adjust your life plan and redesign it from time to time
· Decide what your passion is
· Don’t worry unnecessarily
· Learn to change quickly from one facet to another
· Lower your standards
· Your health is non-negotiable
This article has come at a very important time in my life. I’ve lost faith in the possibility of achieving balance, but alas it might just be possible!
Resource:
Insig, June 2005. P34 – 36. Joan van Zyl.

Paul Caswell wrote a 2 part musing On The Origin of Software by Means of Natural Selection.
Link: Part1 & Part2
PS I think the links might not be working properly, the articles are towards the bottom of the middel of the page.
I did something for the first time today – A conditional where clause, based on a parameter passed or a condition set earlier in the procedure. Its not exactly the first time I’ve done this, but I use to do it very differently.
In the past I would have built the SQL up in a string and then execute it:
CREATE PROCEDURE MyProc @Param1 VARCHAR(100) AS
DECLARE @SQL VARCHAR(8000)
SET @SQL = ‘
SELECT
Field1,
Field2,
Field3
FROM Table1
WHERE ‘
IF @Param1 = ‘A’
BEGIN
SET @SQL = @SQL + ‘ Field5 = 55 ‘
END
ELSE
BEGIN
SET @SQL = @SQL + ‘ Field7 < 10 ‘
END
EXEC (@SQL)
Currently I work with a DBA who is a purist and would not allow the above code in his database – which is excellent by the way! It means that code that gets implemented is a high standard.
So, I ended up writing the procedure as follow:
CREATE PROCEDURE MyProc @Param1 VARCHAR(100) AS
SELECT
Field1,
Field2,
Field3
FROM Table1
WHERE ((@Param1 = ‘A’ AND Field5 = 55)
OR (Field7 < 10))
It just proves again actually how good it is to have a DBA and a proper walkthrough process in place. Previously I would not have been bothered I suppose, and just implemented the 1st block of code, but now every line of SQL I write I have a little DBA on my shoulder telling me: If you don’t change that – he is going to send it back and you gonna have to redo it in any case!
Knowledge is power, but what good is that if we can’t share our knowledge? I’ve created a section on my blog where I will be posting everything I learn about .Net.
Some of it will be what I learn as I go along, and some of it will be what I learn from Hilton & Rudolf’s .Net Juniors Sessions in Cape Town. If you are in the surrounds you are welcome to come and join us. Monday 6th of June at 6 pm at the BoE Clocktower in the V&A Waterfront. Contact Rudolf or Hilton via www.SaDeveloper.Net or you can email me: isolet@bigfoot.com. According to Corné my directions need some amendment, but most of the guys got there ok…
Happy Coding Campers!
In my career I have been very fortunate to work with some brilliant programmers. I suppose being a contractor, one moves around a bit more and are exposed to more and different environments and different people. I would however like to mention 2.
The first one is a programmer not so much older than I am, but he taught me how to program. Not so much a language – he taught me that the programming language is merely the tool I use to do the job. He taught me to think logically. He taught me so well, that I even dream in case statements.
The second guy taught me to write self maintainable systems. I fought with him endlessly on the topic, because I thought that if we write self maintainable systems, we would not be needed! He proved me wrong though, because we always had work to do! There is always room for improvement or more exciting projects to move on to. If we are stuck on the same old systems, because some business rule or requirement has changed – our lives would become extremely boring. He taught me to think outside of the box.
I started working at BoE when I was 20 years old and was under Programmer nr 1’s mentorship. Subsequently I left the company, seen a bit of the world and now 6 years later I am back there. Back there with the knowledge and mentorship I have received from programmer and mentor nr 2. At the same time back at a site who are about to have all their applications re-written in .Net. Not only rewritten, but redesigned.
The only problem is that a lot of the reports and sub-systems have become so terribly intertwined, it is going to be extremely hairy to break the whole system up to properly re-design it all. In hindsight I think we have put the cart before the horse…
The business had an urgent new reporting system requirement. We’ve built our new reporting system on the old database design. Now we are re-designing applications, but are constrained by the scope and use of tables of the newly implemented reporting system. I suppose we can revisit the reporting system in time. . . you know, to keep ourselves busy.
We are still quite far away from starting the design of our new .Net systems, there is still much water that must flow into the Atlantic Ocean. Current project to be finished first (and phase 2 only started now!), all staff to be trained in .Net, Application redesign… We are going to be busy for a while before the first line of code is typed!
However, thinking of all this and venturing in this .Net world I am thinking of my 2 mentors and what I’ve learned from them and I know that with their leadership and mentorship that I carry with me, the sky is the limit!
Christiaan and Japie, tonight I lift my glass of Cabernet to your health and futures!
Again from the Junkies crowd!

Best Practices: Exception Management by Anand Kumar.
This was very interesting, especially since I did my first bit of .NET Exception Handling in code I wrote earlier this morning! I thought about it a bit more. Although this article about best pracitces for the .NET Framework, exception handling is important in any code you write. How often have I not had implemented code come slapping me in the face due to division by 0's?
I am building a list of pointers to remember. So far I have 2:
- Divide? Always check for null or 0
- Always try the positive first e.g. If GetDate() = @SystemDate AND NOT if GetDate <> @SystemDate. The reason I feel strong about this, is because there will be other exceptions in future (possibly), and one tends to just add them at the bottom in a hurry... So If I had to add if DATEDIFF(mm,GetDate(), @SystemDate) > 0, It would never get to it, if I started with GetDate <> @SystemDate...
What can I add to this? Not just .NET, but T-SQL tips would be great as well!
More Posts
Next page »