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 12:37:28 -0700 Message-ID: <20050616193728.GG14624@inkedmn.com> References: <20050615192935.GC14624@inkedmn.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0206863054==" X-Trace: sea.gmane.org 1118950982 27787 80.91.229.2 (16 Jun 2005 19:43:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Jun 2005 19:43:02 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 16 21:43:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dj0Fv-0000Y8-FE for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jun 2005 21:42:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dj0LO-0000tN-Iz for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jun 2005 15:48:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dj0Jf-0000Px-AW for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 15:46:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dj0Jb-0000NU-CU for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 15:46:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dj0JX-0000Hg-TY for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 15:46:13 -0400 Original-Received: from [68.168.78.205] (helo=mta11.adelphia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dj0Cx-0002EQ-7Q for help-gnu-emacs@gnu.org; Thu, 16 Jun 2005 15:39:23 -0400 Original-Received: from toulouse.inkedmn.com ([69.172.208.59]) by mta11.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050616193731.JDTB13270.mta11.adelphia.net@toulouse.inkedmn.com> for ; Thu, 16 Jun 2005 15:37:31 -0400 Original-Received: from christian.inkedmn.com (christian.inkedmn.com [192.168.1.100]) by toulouse.inkedmn.com (Postfix) with ESMTP id 6C5626E448 for ; Thu, 16 Jun 2005 12:23:29 -0700 (PDT) Original-Received: by christian.inkedmn.com (Postfix, from userid 1000) id 38CB04A63B; Thu, 16 Jun 2005 12:37:28 -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:27507 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27507 --===============0206863054== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LwW0XdcUbUexiWVK" Content-Disposition: inline --LwW0XdcUbUexiWVK 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 Kevin - thanks for the reply. Unfortunately, this still doesn't seem to be working. Went through the followig steps: - Opened up a .sql file in a new buffer, called TestSQL.sql - Checked "Pop to SQLi Buffer after Send" in the SQL menu - ran M-x sql-ms RET which created a new SQLi buffer called *SQL* - In the TestSQL.sql buffer, i chose Set SQLi buffer from the SQL menu, and set it to *SQL* - I wrote a simple select statement in TestSQL.sql, highlighted it, and cho= se "send region" from the sql menu. - In the minibuffer, it says "string sent to buffer *SQL*" And that's it, I get no other output beside that. --=20 Brett Kelly inkedmn@inkedmn.com http://inkedmn.com:8000 GPG Public Key: http://inkedmn.com:8000/stuff/inkedmn.asc --LwW0XdcUbUexiWVK 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) iD8DBQFCsdT4oB4gV36UerERAgOhAJ46kkX3sn4re1aT1awGXXxULeN9IwCdEkFf qdSURvHWk0svy5BxPVXEj5w= =j5Xa -----END PGP SIGNATURE----- --LwW0XdcUbUexiWVK-- --===============0206863054== 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 --===============0206863054==--