Dienstag, 18. August 2009

New-InsertStatement (2)

Meanwhile I have a handcoded prototyp of the kind of function i want to generate running. It took some time to get aroung the ADO.NET stuff. The MSDN Dokumentation just isn't written for me. But the nice thing about ADO.NET is that as soon as it is properly wrapped it does a nice job.

And I'm using parameterized Queries. Yes that is the influence of the neverending talk about bind variables from some Oracle Admin.

Using parameterized queries is a two-part buisiness. You an initialization part to run once und afterwards you just bind the parameters and execute the query.

In C-like programming languages I would use a static variable within the function to remember if it is allready initialized.

In PowerShell I miss this feature. I get my job done using script scope, but that exposes the variables too much.

Now I'm going to see if it could be done adding a noteProperty. I do not feel that that is the natural way, but it may be the PowerShell way.

Keine Kommentare:

Kommentar veröffentlichen