From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brett Kelly Newsgroups: gmane.emacs.help Subject: Re: Sql-Mode - getting query results from MS SQL Server 2000 Date: Thu, 16 Jun 2005 14:38:05 -0700 Message-ID: <20050616213805.GH14624@inkedmn.com> References: <20050615192935.GC14624@inkedmn.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1692621240==" X-Trace: sea.gmane.org 1118958250 16451 80.91.229.2 (16 Jun 2005 21:44:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Jun 2005 21:44:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 16 23:44:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dj29f-0003tp-8b for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jun 2005 23:44:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dj2El-0004xE-H8 for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jun 2005 17:49:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dj2E9-0004tZ-Lv for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 17:48:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dj2E4-0004qQ-Mx for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 17:48:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dj2E4-0004mj-Bt for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 17:48:40 -0400 Original-Received: from [68.168.78.199] (helo=mta9.adelphia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dj25h-00025T-I7 for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 17:40:01 -0400 Original-Received: from toulouse.inkedmn.com ([69.172.208.59]) by mta9.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050616213808.QVBF8952.mta9.adelphia.net@toulouse.inkedmn.com> for ; Thu, 16 Jun 2005 17:38:08 -0400 Original-Received: from christian.inkedmn.com (christian.inkedmn.com [192.168.1.100]) by toulouse.inkedmn.com (Postfix) with ESMTP id EA02D6E448 for ; Thu, 16 Jun 2005 14:24:05 -0700 (PDT) Original-Received: by christian.inkedmn.com (Postfix, from userid 1000) id 9CF3D4A63B; Thu, 16 Jun 2005 14:38:05 -0700 (PDT) Original-To: help-gnu-emacs@gnu.org In-Reply-To: User-Agent: Mutt/1.5.9i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27509 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27509 --===============1692621240== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rz+pwK2yUstbofK6" Content-Disposition: inline --rz+pwK2yUstbofK6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 > 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=20 > connection > > information (user, password, server, dbname). This gives me no errors. > > - Type in my SQL statement (I've tried simple "select" statements, as= =20 > well as > > more complicated "create proc" type stuff) > > - Highlight the relevant code with the mouse, and choose Send Region=20 > from the > > SQL menu. > > > > Now, if I'm understanding this correctly, I should see the results in= =20 > a new > > buffer, but I'm not. >=20 > 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). >=20 > ;; 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. >=20 > ;; 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. >=20 > ;; sql-mode can be used to keep editing SQL statements. The SQL > ;; statements can be sent to the SQL process in the SQLi buffer. >=20 > --=20 > Kevin Rodgers >=20 >=20 >=20 > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs >=20 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 n= ice to be able to write/run sql stuff in something other than query analyzer. Thanks for the help! --=20 Brett Kelly inkedmn@inkedmn.com http://inkedmn.com:8000 GPG Public Key: http://inkedmn.com:8000/stuff/inkedmn.asc --rz+pwK2yUstbofK6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCsfE9oB4gV36UerERAvytAJ9iAj5zCxw1+7eaFt0qfJASbdyz6QCdG243 EQ/O9+fjkrm53ng68Gu1El0= =0vi+ -----END PGP SIGNATURE----- --rz+pwK2yUstbofK6-- --===============1692621240== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1692621240==--