Posted by Miguel Egea | Posted in C#, Relacional | Posted on 19-04-2010
0
En un post del grupo de noticias un compañero tenía una duda sobre como crear buscadores, de forma que la consulta SQL no fuese muy compleja de tratar y escribir, a la vez que no tenga problemas de inyección de código y que cumpla con sus requisitos. Yo me he permitido escribir el código todo en C#, aunque me hubiese gustado escribir un procedimiento almacenado, creo que de forma didactica esto va a quedar más claro.
Desde aquí puedes bajarte la aplicacion en zip.
Espero que disfruteis el post.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace Demo_Buscador
{
public partial class Form1 : Form
{
SqlConnection con = new SqlConnection( ConfigurationManager.ConnectionStrings["AdventureWorks2008"].ConnectionString.ToString() ) ;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
DataTable dt=new DataTable();
SqlDataAdapter da = new SqlDataAdapter("select DISTINCT PERSON.PersonType From Person.Person",con);
da.Fill(dt);
TipoPersona.DataSource = dt;
TipoPersona.DisplayMember = "PersonType";
}
private void button1_Click(object sender, EventArgs e)
{
string SQL = "SELECT * FROM Person.Person ";
string where="";
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand();
da.SelectCommand.Connection = con;
if (TipoPersona.Text != null && TipoPersona.Text!="")
{
TipoPersona.Text += " ";
da.SelectCommand.Parameters.Add("@PersonType",SqlDbType.NChar,2).Value=TipoPersona.Text.Substring(0,2);
where += " PersonType=@PersonType AND ";
}
if (Nombre.Text != "")
{
da.SelectCommand.Parameters.Add("@name", SqlDbType.NVarChar, 50).Value = Nombre.Text;
where += " LastName like @name AND ";
}
if (where != "")
SQL += " WHERE " + where.Substring(0, where.Length - 4);
da.SelectCommand.CommandText = SQL;
DataTable DT=new DataTable();
da.Fill(DT);
dataGridView1.DataSource = DT;
}
}
}
Posted by Miguel Egea | Posted in Noticias | Posted on 16-04-2010
0
Microsoft Live Labs Pivots es una herramienta para la explotación masiva de datos, que de momento puedes descargar de aquí.
En la página también hay un video de demostración muy interesante.
Saludos
Posted by Miguel Egea | Posted in Noticias, O.T. | Posted on 14-04-2010
1
We’re thrilled to publish another free ebook: Introducing Microsoft SQL Server 2008 R2, by Ross Mistry and Stacia Misner!
The book contains 10 chapters and 216 pages, like so:
PART I Database Administration
CHAPTER 1 SQL Server 2008 R2 Editions and Enhancements 3
CHAPTER 2 Multi-Server Administration 21
CHAPTER 3 Data-Tier Applications 41
CHAPTER 4 High Availability and Virtualization Enhancements 63
CHAPTER 5 Consolidation and Monitoring 85
PART II Business Intelligence Development
CHAPTER 6 Scalable Data Warehousing 109
CHAPTER 7 Master Data Services 125
CHAPTER 8 Complex Event Processing with StreamInsight 145
CHAPTER 9 Reporting Services Enhancements 165
CHAPTER 10 Self-Service Analysis with PowerPivot 189
Here’s more info about the book:
Podeis verlo aquí
Mi compañero en SolidQ Italia, Davide Mauri ha desarrollado un proyecto que me parece muy positivo. Este es el mensaje que ha puesto Davide.
Y aquí puedes llegar al proyecto
A project that allow the execution of Unit Testing against a database (Relational or Multidimensional).
It uses NUnit (http://www.nunit.org/) )as unit-testing framework and does not require DBA or BI Developer to know anything about .NET: just write your SQL or MDX queries and test them. QueryUnit will take care of automatically create the assembly that will test your query for you, using NVelocity (http://nvelocity.codeplex.com/) to generate .NET classes and the CodeDom engine to compile them at runtime.

Posted by Miguel Egea | Posted in Noticias, Relacional | Posted on 03-04-2010
1
Para hacer el curso puedes pulsar aquí.
Esto es lo que trata.
| This two-hour clinic explores the capabilities of Introduction to Microsoft SQL Azure.
This clinic covers the following topics:
- Understanding the SQL Azure Platform
- Designing Applications for SQL Azure
- Migrating Applications to SQL Azure
- Achieving Scale with SQL Azure
Users completing this collection should have a basic understanding of SQL Server and relational database systems. |
 |
| Objetivos |
 |
|
Al finalizar el curso, los alumnos serán capaces de:
- Understand SQL Server Development
- Understand relational database concepts
|
 |
| Requisitos del sistema |
 |
| |
|
Para ver este curso, necesita:
- Pentium II, RAM de 256 MB con una velocidad de procesamiento de 400 MHZ o más.
- Microsoft® Windows® 2000 o posterior.
- Microsoft Internet Explorer 6.0 con SP1.
- Macromedia Flash 7.0 o posterior (se necesita 1 MB de espacio en disco para la instalación).
- Microsoft Virtual Server ActiveX control (necesario para los laboratorios virtuales; se necesita 1 MB de espacio en disco para la instalación).
- Microsoft Windows Media Player 7.0 o posterior.
- Microsoft XML Core Services 3.0 o posterior.
- Un monitor Super VGA con resolución mínima de 1024 x 768, con colores a 16 bits.
- Se recomiendan una tarjeta de sonido, parlantes o auriculares.
- Un ancho de banda de Internet de 56K o superior. Se recomienda banda ancha.
Para los cursos que incluyan prácticas basadas en Virtual Server (cursos en el catálogo para el programador y el profesional de tecnología de la información), necesitará:
- Control ActiveX de Microsoft Virtual Server (se requiere 1MB de espacio en disco para la instalación)
Pruebe las capacidades de su equipo para ver si podrá ejecutar este curso. |
 |
| Requisitos de accesibilidad |
 |
| |
|
El software siguiente tiene que estar en ejecución en su equipo para poder obtener acceso a este curso con el software lector de pantalla:
- Microsoft Internet Explorer 5.0 o posterior
- Window-Eyes de GW Micro
- JAWS de Freedom Scientific
- Habilitado para MSAA
|
 |
Módulos y lecciones
 |
| Clinic Overview |
| Module Overview |
| Clinic Overview |
| Navigation Overview |
| Clinic Information |
| Introduction to Microsoft SQL Azure |
| Module Overview |
| Understanding the SQL Azure Platform |
| Introduction |
| Windows Azure Platform |
| Extending the SQL Data Platform to the Cloud |
| What SQL Azure Is |
| What SQL Azure Is Not |
| When to Use SQL Azure vs Azure Tables |
| SQL Azure Provisioning Model |
| Provisioning a SQL Azure Account and Connecting to SQL Azure |
| SQL Azure Architecture |
| Creating a SQL Azure Database |
| High Availability and Recovery |
| Self Test |
| Designing Applications for SQL Azure |
| Introduction |
| Logical vs Physical Administration |
| Creating Objects in SQL Azure |
| Compatibility Goals |
| T-SQL |
| T-SQL Support |
| SQL Azure Security Model |
| Managing Logins and Security |
| Connection Model |
| Managing Connections in SQL Azure Applications |
| Managing Connections in a SQL Azure Application |
| Self Test |
| Migrating Applications to SQL Azure |
| Introduction |
| Migrating Database Schemas to SQL Azure |
| Migrating Database Schema to SQL Azure |
| Migrating Application Data to SQL Azure |
| SQL Server Integration Services |
| Working with BCP |
| Migrating Application Data to SQL Azure Using SSIS |
| Choosing an Appropriate Local Caching Strategy |
| Using Local Caching with SQL Azure Data Sync |
| PHP Support for SQL Azure |
| Self Test |
| Achieving Scale with SQL Azure |
| Introduction |
| Why Scale Out? |
| Database Size |
| Performance Considerations |
| Accessing Usage Data from System Views |
| Scale out Considerations |
| Throttling Considerations |
| Sharding Basics |
| Example Sharded Database Model |
| Working with a Sharded Database |
| Self Test |
| Module Summary |
| Module Summary |
| Glossary |
| Glossary |
|
| Para realizar una evaluación, conéctese a su cuenta Passport Network. |
Seleccionó la opción de realizar una evaluación. Recibirá distintas preguntas para la evaluación. Respóndalas lo mejor que pueda.
- Podrá revisar sus respuestas en cualquier momento, antes de finalizar la evaluación, al hacer clic en Revisar
- Podrá finalizar la evaluación en cualquier momento al hacer clic en Finalizar. En ese momento, cualquier pregunta sin responder será considerada como incorrecta.
- Haga clic en Ayuda en cualquier momento para obtener información acerca de la utilización de las evaluaciones.
|
|
 |