473,799 Members | 2,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vs.net 2003 edit/create query without designer

using VS.2003...

This has annoyed me endlessly.

I hate the visual query designer in VS.

Is it possible through add-ins or extensions to have query's you want to
edit open in query analyzer, or the text editor in VS, or a dos shell... or
anything other than the designer.

I can't place comments and the "formatting " sucks ass!
--
kevin...
Apr 5 '06 #1
6 1903
What you probably want to use is a Database Project. Its a project
type in VS.NET. It allows you create your scripts and runit against a
connection. I agree with you, the Query Designer doesn't do a good job
with formatting.

Apr 5 '06 #2
tdavisjr,

I am not at work now, but I seem to remember(I could be wrong) that even
with a db project, trying to edit an existing query throws you into the
designer. If there is a way to edit an existing query in a QA type text
window, how do I do that?

thanks
--
kevin...
"tdavisjr" wrote:
What you probably want to use is a Database Project. Its a project
type in VS.NET. It allows you create your scripts and runit against a
connection. I agree with you, the Query Designer doesn't do a good job
with formatting.

Apr 6 '06 #3
Well in a DB project if you have an existing query (*.sql) you have add
it to the project in order to use it. I've worked with DB projects a
little and I don't remember that it was mandatory to use the query
designer, I think it was an option.

Another option would to look into adding an External Tool to VS.NET
with would automatically launch Query Analyzer and passing in the path
to the .sql file and the db login infomation as arguments. This is not
an ideal solution; but to get one you may have to purchase a third
party tool (if it exist) that does exactly what you want.

Apr 6 '06 #4
Your right, to edit a view as text, it needs to be in a db project

I just wrote this macro

Imports EnvDTE
Imports System
Imports System.IO
Imports System.Diagnost ics

Public Module kevcoder
Sub OpenWithQueryAn alyzer()
Dim sqlFileName As String
Dim args As String
Dim proc As System.Diagnost ics.Process()
Const ISQLW_COMMAND_L INE As String = """C:\Progr am Files\Microsoft
SQL Server\80\Tools \Binn\isqlw.exe """
Const ISQL_COMMNAD_AR GS As String = "-E -f "

Dim procInfo As New
System.Diagnost ics.ProcessStar tInfo(ISQLW_COM MAND_LINE)

sqlFileName = ActiveDocument. FullName.ToLowe r
args = ISQL_COMMNAD_AR GS + """" + sqlFileName + """"

' MsgBox("FileNam e= " + sqlFileName)
'MsgBox("argume nt = " + args)

procInfo.Argume nts = args
procInfo.Window Style = ProcessWindowSt yle.Maximized

Try
System.Diagnost ics.Process.Sta rt(procInfo)
Catch ex As Exception
MsgBox("Could not open " + Path.GetFileNam e(sqlFileName) + "
with Query Analyzer\n" + ex.ToString())
End Try
End Sub
End Module
--
kevin...
"tdavisjr" wrote:
Well in a DB project if you have an existing query (*.sql) you have add
it to the project in order to use it. I've worked with DB projects a
little and I don't remember that it was mandatory to use the query
designer, I think it was an option.

Another option would to look into adding an External Tool to VS.NET
with would automatically launch Query Analyzer and passing in the path
to the .sql file and the db login infomation as arguments. This is not
an ideal solution; but to get one you may have to purchase a third
party tool (if it exist) that does exactly what you want.

Apr 7 '06 #5
Using a macro wouldn't be the first thig I would have tried. Have you
looked at the External Tools option in VS for launching external
programs? That would have semmed to be a better solution.

Apr 11 '06 #6
Yes I have.
My thought was that with a macro I could hook into the development
environment, specifically the Server Explorer window, and determine the name
of the object selected.
Once I know the object name and type(sp or view) that I can
1. retrieve the text of the sp/view with following tsql (retrieved from
Profiler)
select c.text
from dbo.syscomments c, dbo.sysobjects o
where o.id = c.id and c.id = object_id(N'dbo .MySP')
2. save to a temp file
3. execute isqlw.exe with arguments

I am currently stuck at getting to the Server Explorer Window... but that
will just take a bit more google and reading to find the right object names
--
kevin...
"tdavisjr" wrote:
Using a macro wouldn't be the first thig I would have tried. Have you
looked at the External Tools option in VS for launching external
programs? That would have semmed to be a better solution.

Apr 11 '06 #7

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

Similar topics

2
2208
by: Jeff Levinson [mcsd] | last post by:
I guess I would have to know what you mean by "not being able to edit the forms". Does this mean you get an error in the designer when you try to display an inherited form? Does this mean the controls are visible, but you can't move them around? What exactly does it mean? There are a variety of methods for editing visuallly inherited forms and I've never had a problem with it in any version of VS.
3
1589
by: Taylor | last post by:
Good afternoon. I have recently converted an Access 97 application to Access 2003. The conversion went rather smoothly. However I am getting different results from the same exact query. I can debug.print the sql string and copy and paste it into 97 and 2003 query designer and get different results. I have seen the results come back the same if I edit the SQL in 2003 by adding a space or somethig but not changing the criteria.
1
2854
by: Matt Alanzo | last post by:
On another newsgroup an Access knowledgable party posted: >You should be able to connect an Access ADP to an existing SQLExpress >database running in SQLS 2000 compatibility mode. The only thing you >won't be able to do is access any of the design surfaces for SQLS >objects in the ADP. I checked with the Access team on this :-) > I appealed for clarification but without reply. Maybe somone on this newsgroup can provide insight.
1
10088
by: libbythomas | last post by:
I created an Access 2000 form from a query. But I cannot edit it. I can flip through the records. If I create a table from the query (maketable) and then create the form from the table, it is editable. But that is not the way I want it. Any suggestions?
4
3720
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml file via some editable controls such as text boxes , option boxes etc. how can i implment this , should i use another xslt file with <INPUT> controls . if so how can i save the result back using the asp.net
17
4422
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
3
1596
by: AnandaSim | last post by:
Hi All, I'm experiencing what I think is a bug - can't figure out how it would be stated so difficult to search the NG. I have a form. It has four listboxes. Each listbox has a rowsource. The four listboxes cascade in criteria. So the next listbox in the sequence uses the formname!listboxX as the criteria for the rowsource. Not unusual.
27
3798
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB updates the same data in all other four tables in the right places. I know it would be possible by using the ForeignKeyConstraint object. I have created the tables using the DataSet Visual Tool and I know it doesn't create any ForeignKeyConstraint obj....
2
5687
by: Joh Smith | last post by:
I have a form called Parent that I mark as abstract (MustInherit). Then I add another form called Child that inherits Parent and implements all Parent abstract methods. It compiles Ok, but when i try to edit Child in Form Designer I get following error: The designer must create an instance of type Parent' but it cannot because the type is declared as abstract. Funny thing is I am still able to view Parent and edit it in the designer....
0
9540
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.