[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sql-Mode - getting query results from MS SQL Server 2000
From: |
Brett Kelly |
Subject: |
Re: Sql-Mode - getting query results from MS SQL Server 2000 |
Date: |
Thu, 16 Jun 2005 14:38:05 -0700 |
User-agent: |
Mutt/1.5.9i |
Sometime around Thu, Jun 16, 2005 at 12:15:57PM -0600, Kevin Rodgers said:
> Brett Kelly wrote:
> > I'd like to be able to type in a sql query and have it return a
> resultset in a
> > different buffer (a la Query Analyzer). Here's what I'm doing now:
> > - Create a new buffer, do M-x sql-ms RET, then enter the relevant
> connection
> > information (user, password, server, dbname). This gives me no errors.
> > - Type in my SQL statement (I've tried simple "select" statements, as
> well as
> > more complicated "create proc" type stuff)
> > - Highlight the relevant code with the mouse, and choose Send Region
> from the
> > SQL menu.
> >
> > Now, if I'm understanding this correctly, I should see the results in
> a new
> > buffer, but I'm not.
>
> From the commentary at the top of sql.el excerpted below, I guess that
> you are typing your SQL statement directly into the sql-interactive-mode
> *SQL* buffer. If you enter them in some other sql-mode buffer, Send
> Region should cause the *SQL* buffer with the results to be displayed
> (see sql-pop-to-buffer-after-send-region).
>
> ;; This file provides a sql-mode and a sql-interactive-mode. The
> ;; interactive mode had to provide a command-line history; the other
> ;; mode had to provide "send region/buffer to SQL interpreter"
> ;; functions.
>
> ;; sql-interactive-mode is used to interact with a SQL interpreter
> ;; process in a SQLi buffer (usually called `*SQL*'). The SQLi buffer
> ;; is created by calling a SQL interpreter-specific entry function. Do
> ;; *not* call sql-interactive-mode by itself.
>
> ;; sql-mode can be used to keep editing SQL statements. The SQL
> ;; statements can be sent to the SQL process in the SQLi buffer.
>
> --
> Kevin Rodgers
>
>
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
Well, I guess that was my core "goal" - to get emacs to behave as much as
possible like Query Analyzer...
I spend probably half of every day writing sql code, just thought it'd be nice
to be able to write/run sql stuff in something other than query analyzer.
Thanks for the help!
--
Brett Kelly
inkedmn@inkedmn.com
http://inkedmn.com:8000
GPG Public Key: http://inkedmn.com:8000/stuff/inkedmn.asc
signature.asc
Description: Digital signature