HQuintas Posted February 20, 2021 at 07:31 PM Report Share #621408 Posted February 20, 2021 at 07:31 PM Boas, Novos erros após actualização SQLite. Recentemente fiz um upgrade de uma máquina para windows 10 64 bits, actualizei a dll do sqlite para a versão 1.0.113.0 mas só tem surgido problemas. Para adicionar um novo registo tinha a seguinte rotina: If existe() = False Then strSQL = "INSERT INTO clientes (id,nome,morada1,morada2,codpostal,local,tel,movel,nif,email) " & "VALUES (@id,@nome,@morada1,@morada2,@codpostal,@local,@tel,@movel,@nif,@email)" Else strSQL = "UPDATE clientes set id=@id,nome=@nome,morada1=@morada1,morada2=@morada2,codpostal=@codpostal,local=@local,tel=@tel,movel=@movel,nif=@nif,email=@email WHERE id=@id" End If Dim cmd As New SQLiteCommand(strSQL, connection) connection.Open() With cmd.Parameters .Add("@id", SqlDbType.Int).Value = txt_numcli.Text .Add("@nome", SqlDbType.VarChar).Value = txt_nome.Text .Add("@morada1", SqlDbType.VarChar).Value = txt_morada1.Text .Add("@morada2", SqlDbType.VarChar).Value = txt_morada2.Text .Add("@codpostal", SqlDbType.VarChar).Value = txt_codpos.Text .Add("@local", SqlDbType.VarChar).Value = txt_localidade.Text .Add("@tel", SqlDbType.VarChar).Value = txt_tel.Text .Add("@movel", SqlDbType.VarChar).Value = txt_movel.Text .Add("@nif", SqlDbType.Int).Value = txt_nif.Text .Add("@email", SqlDbType.VarChar).Value = txt_email.Text End With cmd.ExecuteNonQuery() connection.Close() frm_orca_lista.txt_num_cliente.Text = txt_numcli.Text frm_pesqCliente.Close() Me.Close() Como posso resolver? Será que é a versão certa?...? Também para ler, tenho que alterar as rotinas. O que funcionava bem deixou de funcionar. Link to comment Share on other sites More sharing options...
Solution HQuintas Posted February 28, 2021 at 09:41 AM Author Solution Report Share #621512 Posted February 28, 2021 at 09:41 AM Resolvido. ;Version=3;Pooling=True;Synchronous=Off;journal mode=Memory; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now