Questions tagged as 'sql'

1
answer

JAVA - Connection with database - SQLException error: Parameter index out of range

Hello! I'm new to Java, and I came across this problem: Netbeans accuses me that I am not respecting the SQL parameter limits, but they are correct. Part of the error in question: Testando conexão com banco de dados... jun 03, 2018 8:1...
asked by 04.06.2018 / 01:14
3
answers

Display the result of a COUNT in the Database

The PHP code looks like this: $con = new PDO(SERVIDOR, USUARIO, SENHA); $sql = $con->prepare("SELECT COUNT(id) FROM quiz;"); $sql->execute(); $n = $sql->fetchObject(); And the HTML code looks like this: &l...
asked by 28.05.2018 / 23:34
1
answer

Add values in a Select (postgres)

I'm having a little problem, I need to populate a gridview in C #, but my query is not doing the sum of some values and this is causing the company code to be repeated and with the value "separated" p> The value I need is the sum of the 3 valu...
asked by 07.06.2018 / 20:06
0
answers

Update Error Oledb C # [closed]

I can not use the UPDATE command more than once. ( link ) ( link ) ( link ) For example, when I perform the update at id 43, that's fine. But when I try to finish 44, it does not finish, but the 43 that gets the update .. Code:...
asked by 20.05.2018 / 23:19
0
answers

How to send data from the combobox to a DBMS sql server? [closed]

I have an application where one of the forms contains a comboBox with data filled from the Item (Collection) property. How to send data that is in this comboBox to a sql server database?     
asked by 01.06.2018 / 10:25
1
answer

OPENROWSET - How to assign a variable in place of the file name to open?

I make this command and it's true: SELECT * FROM OPENROWSET( 'Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;Database=\00.000.00.0000\Arquivos\TI\Arquivos2203408.xlsx;HDR=YES', 'SELECT * FROM [Rateio$]'); How can I put a variable in place...
asked by 16.05.2018 / 19:48
1
answer

Connect MS SQL to PGADMIN

Hello, good afternoon! I need to know if there are any tools, scripts or anything else where I can have the following scenario: I have an MS SQL database however I need to manipulate it through pgAdmin (postgres). Cnosegui do the invers...
asked by 15.05.2018 / 21:33
2
answers

add rows to datagridview

How can I declare the @NIF as a string Dim sqlConString As String = "Server=localhost\TESTE;Database=tempTest;User Id=sa;Password=123" Dim conn = New SqlConnection(sqlConString) Try Conn.Open() Dim strSQL As String = "S...
asked by 09.05.2018 / 13:28
0
answers

Download bank data in csv format

I am trying to download the database data in csv format but it indicates that the SQL syntax is wrong. public void exportarBaseRespostaPI() { String banco = "b2wentregascorreios"; String tabela = "baserespmanifest"; String caminho...
asked by 09.05.2018 / 18:03
0
answers

Hibernate Query with setParameters

Hibernate is ignoring my data from a Map when it is null. If I hedge with setParameter("nome",valor) and the value is null it works, does anyone know how to solve it? Here is the code: public List selectList(String sp, Map par...
asked by 09.05.2018 / 20:34