Solved

SQL Code generators - addin?

Posted on 2002-04-30
9
227 Views
Last Modified: 2010-05-02
I'm tired of retyping my field names. What tools are available that will let me PICK instead of TYPE- and will construct my SQL statements?

Is there a VB add-in?

There has got to be a better way.

What are my options? Anything worthwhile for 100$ or so?

Where do I start looking?
0
Comment
Question by:michael_wiswell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 6981966
Where are you typing them in?
Instead, maybe you can use a generic procedure in a module that handles much of this for you?  It could certainly assemble the SQL statement for you.  As for getting the fields, you could probably create a user-defined control to query the DB and offer them to you or drop them into the clipboard for pasting.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6982043
studio 7.0(For Strongly typed datasets) :)) but it cost ~$2000

or you can use dataEnvironment to create different commands and copy/paste sql statemens
Or
Add-ins -> Visual Data manager
or
project ->add form (and choose data form wizard.)

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:michael_wiswell
ID: 6982074
I type the field names & sql statements into VB. I use stored procedures as well.

I am used to a case tool on the AS400. I would just pick my table, and then pick columns from that table. To select- I would just note which fields needed to match & supply the values. The other fields would be returned. The only time I ever typed the field names was as I created the DB2 relational database.

I have written some code to assemble SQL statments, but it is a real "poor mans" substitution.

Creating default "templates" for creating select, insert, update, and delete SUBs should be a piece of cake.

Menu option &NewSqlSub. Select a FUNCTION (SELECT or INSERT or UPDATE or DELETE). Pick desired table from a list (from default database). Select input parms. Select columns you want returned. Set PROPERTIES to change the cursor location, recordset persistence, etc.

The resulting Module Name takes the FUNCTION, concats the TABLE, maybe tack on a number...

Keep it all in a SqlMyDB.BAS or whatever.

It would be nive if it would also let you generate a set of fields for local or module usage: m_intSeqNumber as integer. Maybe with a prefix to denote the tie to the database.

If I had time I'd write it myself... but someone else has to have done this already. Heck, it might be a standard add-in.
0
 

Author Comment

by:michael_wiswell
ID: 6982096
rkot & vinny- I saw your comments after the first. The code from planet source code looks VERY promising- have you used it?
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6982110
I downloaded it this morning but have not tried it yet.I'm going to try it out tonight.The one person that commented on it said it was the best vb add in they have ever seen so I figured I would check it out.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6982310
I use Microsoft's ADO Stored Procedure Add-In for Visual Basic, but this only helps with Stored Procedures.

Anthony
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6982317
You can download it from here:
http://msdn.microsoft.com/code/default.asp?URL=/code/sample.asp?url=/MSDN-FILES/026/000/152/msdncompositedoc.xml

Here is the description:
<quote>

ADO Stored Procedure Add-in  
This add-in automates the task of mapping Microsoft® SQL Server® stored procedure parameters to ADO command object parameters. It will insert ADO code into your Microsoft Visual Basic® project based on user-selected code generation options.

</quote>
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 59 total points
ID: 6982588
Here is the code for you,

http://www.freevbcode.com/ShowCode.Asp?ID=75

Narayanan
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question