CodingSQL Server- select columns on the fly?

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Ally   
 To:  Kenny J (WINGNUTKJ)     
35441.3 In reply to 35441.2 

Cheers. SQL Server has in-built security to stop "field1, DROP TABLE *" being injected in there, doesn't it?

 

It's going into a DataSet in a .NET console application. I thought about doing it directly to XML in SQL Server (I know nothing about it, but I assume it can do at least the basics and probably perform better) but the resulting XML needs to be customised for each export- and writing that kind of customisability into SQL Server would probably cause my head to explode.

 

Plus one or two places use CSV, because they're mental.

0/0
 Reply   Quote More 

 From:  Kenny J (WINGNUTKJ)  
 To:  Ally      
35441.4 In reply to 35441.3 

Use SQL Server Integration Services?

 

(Althought TBH, writing your own C# is probably less painful than some of the faffing you have to do in SSIS.)

 

As for SQL Injection attacks, there's nothing that'll explicitly prevent that sort of thing, so you still have to clean your parameters before using them, but you can set up the security so that the user who calls the stored procedure don't have the rights to drop tables or whatever.


Kenny
The Wisdom of IMDB Messageboards:
One Night At McCool's

There's one thing I don't understand: Why would Randy and Jewel, for some reason, have sex right at the beginning of the movie?

-- Um, like, are you kidding? Randy sees the golden opportunity (like finding plutonium by accident) and takes it.
0/0
 Reply   Quote More 

 From:  Ally   
 To:  Kenny J (WINGNUTKJ)     
35441.5 In reply to 35441.4 
Ah, fair enough. It's all being called internally, so there's no change of Mr. Joe Public ruining everything. But you're right, the user won't have the sufficient permissions to do any of that anyway.
0/0
 Reply   Quote More 

Reply to All    
 

1–5

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats