O'Reilly logo

ADO.NET Programming in Visual Basic™ .NET by Bob Howell, Steve Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parsing Your SQL Statement–A Better Way

Now that we’ve seen the program work with manually creating the SQL statements let’s look at a quick procedure to parse the SQL statement and create the parameters for us. Of course you could use the CommandBuilder object, but that would be too easy—we are programmers after all.

To prepare for this project, create a new Windows Forms project and call it ADOBook06-04. You can copy the form file from the previous project into this project. We will then modify the code in the new project. You can also download the code from the book’s web site if you don't want to type it in.

As it turns out, SQL statements are well formed and have a very predictable pattern. This makes parsing them relatively easy. If you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required