Changing Connection Properties At Run Time (T-SQL)

Changing Connection Properties At Run Time (T-SQL)

Post by Lee » Fri, 17 Mar 2000 04:00:00



My Problem is this....

I am using T-SQL in SQL 7.0 to create an output file from a Query (A stored
procedure actualy).

But My query results contain a heading i.e.

query result heading
----------------------
my data here !!

There is a connection setting available through the GUI.
Current Connections, Advanced, and there is a Print headers check box which
allows you to turn the headings off.

But can I change this at run time (during the execution of my Stored
Procedure) ??

Since I don't want any headings to appear in my output file.

Any help would be great.

Thanks In Advance,

Lee.
:>

 
 
 

Changing Connection Properties At Run Time (T-SQL)

Post by Tony Rogerso » Fri, 17 Mar 2000 04:00:00


Perhaps exec the sql using isql command line executed from
master..xp_cmdshell - use the switch -H-1 to get rid of headers.

You could also use print but it would be inefficient as you would need to
use a cursor to print each row.

--
Tony Rogerson SQL Server MVP
Torver Computer Consultants Ltd
www.sql-server.co.uk (UK User group, code library, FAQ etc..)


Quote:> My Problem is this....

> I am using T-SQL in SQL 7.0 to create an output file from a Query (A
stored
> procedure actualy).

> But My query results contain a heading i.e.

> query result heading
> ----------------------
> my data here !!

> There is a connection setting available through the GUI.
> Current Connections, Advanced, and there is a Print headers check box
which
> allows you to turn the headings off.

> But can I change this at run time (during the execution of my Stored
> Procedure) ??

> Since I don't want any headings to appear in my output file.

> Any help would be great.

> Thanks In Advance,

> Lee.
> :>


 
 
 

Changing Connection Properties At Run Time (T-SQL)

Post by Lee Walke » Sat, 18 Mar 2000 04:00:00


Thanks Tony,

I'm running my procedure within the SQL Server Job Scheduler
I added the osql command line execution
(with -h-1 switches as you suggested).

It worked a treat.

Cheers

Lee

:>

* Sent from Devdex.com http://www.devdex.com The Web Developers Index *
The world's largest index site for Microsoft web technologies.

 
 
 

1. changing graph properties at run time

Has anyone had any experience with this.  I am trying to reset the axis min
and max values in a graph without having to go in and edit the MS Graph at
run time.  Has anyone done this?  It seems like a natural thing to want to
do - but that rarely matters.  Thanks for any help.

--
__________

Tim Smith
http://neurocog.lrdc.pitt.edu/~tws

412-624-8193
632 LRDC

2. Ingres DBA and Developers Needed

3. Changing Locked Property in Access 2.0 During Run Time

4. Converting Access 97 MDB file to Access 2000

5. changing the datasource property of a text box at run time

6. Onbar XBSA error 100

7. True DBGrid (Changing Header properties at run time)

8. Database for template based web pages

9. Changing Userconnection properties at run time.

10. Connection Properties at Run-time

11. Setting Connection Properties At Run Time.

12. Changing the ADO control connection string at run time

13. How do I change the connection string at run time