Posts by Marcelo Macedo • 163 points
19 posts
-
0
votes3
answers680
viewsA: Help with Sqlquery in context Entity Framework
Try to use between. Get like this: var result = context.Database.SqlQuery<List<Tuple<int, string, string>>>("SELECT COUNT (ate.id) AS data, pes.tp_raca AS categories, " +…
-
-1
votes3
answers458
viewsA: How to Update to Linq?
What you can do is change your Entities normally and then use Submitchanges(), which will persist all changes made up to that point.
-
1
votes3
answers220
viewsA: Select multiple tables at the same time in SQL
SELECT * FROM Pacientes pac LEFT JOIN anamnese as ana ON ana.idPacientes = pac.idPacientes LEFT JOIN avaliacao as ava ON ava.idPacientes = pac.idPacientes LEFT JOIN intervenção as int ON…
sqlanswered Marcelo Macedo 163 -
0
votes2
answers86
viewsA: Save photo to database and then display it
Thus: comando.Parameters.Add(new SqlParameter("@NOME_CAMPO_IMAGEM", nomeArquivo)); But the variable string nomeArquivo must be declared globally to be viewed at the time of bank recording. And you…
-
1
votes1
answer37
viewsA: How can I get Serialnumber from the BIOS
Option Explicit Private m_mainWmi As Object Private m_deviceLists As Collection Private Function GetMainWMIObject() As Object On Error GoTo eh If m_mainWmi Is Nothing…
visual-basic-6answered Marcelo Macedo 163 -
1
votes2
answers53
viewsA: I need to select which employees are allocated to which projects
Solution is more or less like this: SELECT projeto.nome, func.nome FROM tbProjeto as projeto LEFT JOIN funcionario as func ON func.codFunc = projeto.codFunc
-
0
votes2
answers461
viewsA: Check if active internet connection
It is that this solution is called API and depends on specific Dlls. Another solution is to use the INET component and encode like this: Wresposta = Inet1.OpenURL("http://www.brasil.gov.br/") if…
visual-basic-6answered Marcelo Macedo 163 -
0
votes2
answers461
viewsA: Check if active internet connection
Private Declare Function Ping Lib "iphlpapi" _ Alias "#65" (ByVal pInternetProtocol As Long, pNumberOfCalls As Long, _ ByVal pMaxNumberOfCalls As Long, lTime As Long) As Long Private…
visual-basic-6answered Marcelo Macedo 163 -
0
votes2
answers597
viewsA: Join column data online - SQL Server
Try this: SELECT Usuario, Telefone1 [TELEFONE] FROM tbUsuario UNION ALL SELECT Usuario, Telefone2 [TELEFONE] FROM tbUsuario UNION ALL SELECT Usuario, Telefone3 [TELEFONE] FROM tbUsuario…
-
0
votes1
answer35
viewsA: How to extract the SQL Server log file from the server?
Example command to reduce Sql Server log file alter database sh_rodov01 set recovery simple dbcc shrinkfile (sh_rodov01_log, 10) alter database sh_rodov01 set recovery full…
sql-serveranswered Marcelo Macedo 163 -
0
votes1
answer289
viewsA: Lockar SELECT when I do an UPDATE - Sqlserver
If you want to block the table for writing until the end of a transaction use: Code Snippet SELECT * FROM TABELA (HOLDLOCK) If you want to block the table for reading and writing until the end of a…
-
1
votes1
answer3233
viewsA: Take only the value and format in 2 decimal places
cast(seu_campo AS NUMERIC(15, 2))
-
2
votes1
answer136
viewsA: SELECT to fill in a field
SELECT m.matricula AS id , UPPER(p.nome) AS text FROM matricula as m JOIN pessoas as p USING (seq_pessoa) WHERE m.matricula = matricula Remembering that the variable matricula must be informed, as…
-
0
votes1
answer88
viewsA: Doubt about foreign key Ibernate
When you have two tables with many-to-many relationship you have to have a table in the middle. That’s why you have the diary_place. And to maintain the consistency of the data we use the two…
-
0
votes1
answer121
viewsA: Printing by VBS - Windows 2008 R2 Server
I just went through this problem in an application developed in Delphi. The problem had nothing to do with the code. It was simply a matter of configuring which program the file should be opened…
-
0
votes1
answer46
viewsA: Vb6 Tabstrip - How to view Tabs controls outside the scope
Go to Tab’s property (Property Pages). In the second tab (Tabs) you will have the Insert Tab button with all its properties (Index, Caption, Key, Tag, Tooltip...).
visual-basic-6answered Marcelo Macedo 163 -
1
votes2
answers118
viewsA: How to improve the performance of an xls file generator in my Delphi 4 + SQL Server 2000 application?
Column width, there is a property that leaves autosize (I already did this in VB6). I didn’t understand the thing of writing the column header with each iteration with the dataset, I should do it…
-
-1
votes3
answers680
viewsA: How do I read the output of a loop-based process? [C#]
Change that: processo.StartInfo.WorkingDirectory = (Application.StartupPath + @"\Debug"); That’s why: processo.StartInfo.WorkingDirectory = (Application.StartupPath); 'Cause you’re just duplicating…
-
0
votes3
answers132
viewsA: Error concatenating component value in query
Just take the simple quotes from the 0 (zero). string Consulta = @"select nome as Nome, endereco as Endereço, telefone as Telefone, dataCadastro as [Data de Cadastro] From clientes where…