Questions tagged as 'sql'

2
answers

Select does not return anything

I have the following method: public DataTable Select(bool all = true, string campos = null) { if (all && campos == null) _sql.Append("SELECT * FROM "); else _sql.Append("SELECT " + campos + " FROM "); _sql.A...
asked by 02.01.2015 / 14:03
1
answer

Foreign key joint between index field and a possible string

I'm creating an application where I thought of a possibility to insert all the existing addresses in the system into a single table, for users, clients, suppliers, etc. the structure of my table would look like this: __id => CHAVE_PRIMÁRIA...
asked by 23.01.2015 / 20:53
3
answers

Create tables randomly

My question is: I have a table containing 25 records of people names. But I need to randomly divide it into 5 groups of 5 people. Being a 'Group A' table with 5 people, another table 'Group B' with 5 people and so on. You need to be in...
asked by 19.09.2014 / 21:31
1
answer

Update of Multiple Images

My code is currently playing its part well up and putting the watermark on upload images, but I would like to be storing the names of all images in the database. $idnoticia = $_GET['idnoticia']; $watermark = imagecreatefrompng('watermark.png'...
asked by 06.04.2015 / 15:17
1
answer

Error connecting to SQL Server 2012 database - using IIS 7.5 server

I'm getting this error.    Network-specific or instance-specific error when connecting to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote c...
asked by 07.04.2015 / 21:39
2
answers

List in each position the employees who had the most change of charge

Good evening guys. I have a problem that I have been trying to solve for some time and I came to ask you here. It is as follows: I have three important entities for this solution: For ease, I'll just put the "minimum" fields. Official...
asked by 27.11.2014 / 23:56
1
answer

How to get the script to create foreign keys for the whole database? SQL Server 2008

I would like to know if there is any command that returns me the script of creating the foreign keys in SQL server, as well as the command sp_helptext I return the creation script of views and stored procedures for example. Thanks     
asked by 06.11.2014 / 14:15
1
answer

Use inner join with BindingSource

I'm trying to query an access database using inner join along with BindingSource , this binding will send the data to a Datagridview . However, when the data is loaded into the grid, the displayed results are a select comm...
asked by 26.08.2014 / 20:18
3
answers

How to do a select with several 'where like' field %% in C #

The select below works, but it searches all fields and would like idaluno , nomealuno and cpf to be searched and sorted by idaluno SELECT idaluno,nomealuno,responsavel,cpf,rg,fone_contato,desistente FROM aluno...
asked by 26.07.2014 / 21:51
1
answer

query error in mysqli

Person, as I tidy this my code, it is giving error: <?php //IMPRIME TODOS OS VALORES DO BANCO CADASTRO $servidor = "localhost"; $usuario = "root"; $senha = "admin"; $banco = "cadastro"; //conecta-se ao banco de dados Mysql $con = n...
asked by 02.08.2014 / 23:42