Solved

SQL Code generators - addin?

Posted on 2002-04-30
9
221 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
  • 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
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6982049
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Paint/Redraw window while dragging 16 83
passing parameter in sql procedure 9 65
Help me. 3 60
Publisher:   Unknown     VB.exe Application 1 28
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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