Solved

SQL Code generators - addin?

Posted on 2002-04-30
9
220 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

786 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