473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Output Stored Procedures as text problem

I'm using the function below to output all of my stored procedures into

a text file. Fice, except that the output file does not reflect the
names of the stored procedures correctly if the name has been changed.
For example, I create a stored procedure named: "sp123" and then rename

it to "sp123DELETE" or "sp123 DELETE" or "sp123OLD" or "sp123 OLD" and
what I end up with is four entries in the output file all having the
stored procedure name "sp123."
I stop the service and restart before outputting the file.
Any help is appreciated.
lq
Function ExportSP(myPath As String)
Dim objSQLServer As New SQLDMO.SQLServer
Dim dbs As New SQLDMO.Database
Dim sp As SQLDMO.StoredProcedure
Dim sptext As String
objSQLServer.Connect <Servername>, <Username>, <Password>
Set dbs = objSQLServer.Databases(<databasename>)
Open myPath For Output As #1
For Each sp In dbs.StoredProcedures
sptext = sp.Text
Print #1, sptext & _
vbCrLf & vbCrLf & vbCrLf & _
"*******" & _
vbCrLf & vbCrLf & vbCrLf
Next
End Function

Nov 13 '05 #1
2 1552
Hi, Lauren.

Try checking

sp.Properties("IsDeleted")

before dumping the text.
HTH,
Gord
p.s. Nice work on SmartTree!

Nov 13 '05 #2
Thanks for the thanks on SmartTree!

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chrisbarbers | last post by:
--part1_108.256bef7d.2c5af59f_boundary Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hi =A0 I have purchased a package that uses ASP and SQL,...
2
by: M Wells | last post by:
Hi All, I'm wondering if anyone can tell me if it's possible to search for stored procedures by their contents? I tend to leave very descriptive notes in stored procedures and they're...
1
by: Karl | last post by:
Hi, I am trying to put SQL Server Stored Procedures into Sourcesafe as per the Microsoft Knowledge Base article 818368, but have run into a problem. The web server is SQL Server 2000 running on...
4
by: laurenq uantrell | last post by:
I'm using the function below to output all of my stored procedures into a text file. Fice, except that the output file does not reflect the names of the stored procedures correctly if the name has...
5
by: Raquel | last post by:
This is a very simple DB2 SQLJ stored procedure. The problem is that it seems to run fine but returns NOTHING. I mean..as if nothing has happened..not resultset is returned. I am passing value...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
5
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored...
5
by: Rob Wire | last post by:
For the code below, how could I add an item in the drop down lists for both company and location to be an "All" selection that would send to the stored proc. spRptAttachments a value of "%" so...
3
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.