<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6757116402343534658</id><updated>2012-01-24T09:40:03.512+01:00</updated><title type='text'>Firebird  -  VB.net</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-717957489764938191</id><published>2011-10-30T11:47:00.001+01:00</published><updated>2011-10-30T12:06:38.091+01:00</updated><title type='text'>Refresh Datagridview after update, insert. Resolved</title><content type='html'>All names are in italian language. As client you can choose an Oledb client instead of Fb client.&lt;br /&gt;As connection string, for embedded server,&amp;nbsp; you can use this one: strConn= &lt;span style="color: blue;"&gt;"servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\YourDB.gdb"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We'll name the application main form "MainForm". First, in main form class of your project insert this routine:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Public Sub GetData(ByVal strSQL As String, ByVal Table As String)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim com As New FbCommand&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim adap As New FbDataAdapter&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ds As New DataSet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim connection As FbConnection = New FbConnection(strConn)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connection.Open()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adap = New FbDataAdapter(strSQL, strConn)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adap.Fill(ds, Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.DataGridView1.DataSource = ds.Tables(Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connection.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&lt;span style="color: black;"&gt;As edit routine use this code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjConnection.Open()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ObjCommand As New FbCommand()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjCommand.Connection = ObjConnection&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjCommand.CommandText = "update YourTable set contesto='" &amp;amp; Replace(Me.txtDidascalia.Text, "'", "''") &amp;amp; "', Percorso='" &amp;amp; Replace(Me.txtPercorso.Text, "'", "''") &amp;amp; "'where contatore='" &amp;amp; MaiForm.DataGridView1.CurrentRow.Cells("Contatore").Value &amp;amp; "'"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjCommand.ExecuteNonQuery()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("Percorso del file non univoco", MsgBoxStyle.Critical, "Errore di immisione")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Finally&lt;br /&gt;MainForm.GetData("select*from YourTable", "YourTable")&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;span style="color: #6aa84f;"&gt;' Columns names are in italian language &lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue;"&gt;MainForm.DataGridView1.Columns("Contesto").HeaderText = "TITLE"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.DataGridView1.Columns("Percorso").Visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.DataGridView1.Columns("Contesto").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Close() &lt;/div&gt;&lt;br /&gt;As insert routine we'll use code:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;Dim ObjConnection As New FbConnection()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim connection As FbConnection = New FbConnection("servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\YourDB.gdb")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connection.Open()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #6aa84f;"&gt;' Start a local transaction.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Enlist the command in the current transaction.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim command As FbCommand = connection.CreateCommand()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; command.CommandText = _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "insert into Immobili" _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " (Contesto, Percorso) values ('" &amp;amp; Replace(Me.txtDidascalia.Text, "'", "''") &amp;amp; "','" _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; Replace(Me.txtPercorso.Text, "'", "''") &amp;amp; "')"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; command.ExecuteNonQuery()&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("Questo titolo di immagine esiste già. Cambia il titolo")&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjConnection.Close()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.GetData("Select*from YourTable order by contesto", "YourTable")&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.DataGridView1.Columns("Contesto").HeaderText = "TITLE"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.DataGridView1.Columns("Percorso").Visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.DataGridView1.Columns("Contesto").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainForm.txtSearch.Focus()&lt;/div&gt;&lt;div style="color: blue;"&gt;Me.Close()&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;span style="color: black;"&gt;Goodbye&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-717957489764938191?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/717957489764938191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=717957489764938191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/717957489764938191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/717957489764938191'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2011/10/refresh-datagridview-after-update.html' title='Refresh Datagridview after update, insert. Resolved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-1411198709015064814</id><published>2011-10-29T11:07:00.000+01:00</published><updated>2011-10-29T11:07:37.144+01:00</updated><title type='text'>Remove empty rows in text files? Solved</title><content type='html'>A small code snippet may be very useful in many situations to remove empty rows in text files. Here is the code:&lt;br /&gt;First: in Form1 insert a label by which you indicate to user the directory&amp;nbsp; where is the converted file: ie C:\beta.tex&lt;br /&gt;&lt;span style="color: blue;"&gt;Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objFileToRead, objFileToWrite, objFSO, strPathWrite&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpenFileDialog1.FileName = ""&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpenFileDialog1.Filter = "Text files .txt|*.txt"&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.OpenFileDialog1.ShowDialog()&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strPathWrite = "C:\beta.txt"&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFSO = CreateObject("Scripting.FileSystemObject")&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToRead = objFSO.OpenTextFile(OpenFileDialog1.FileName, 1)&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToWrite = objFSO.OpenTextFile(strPathWrite, 2, True)&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strTemp&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not objFileToRead.AtEndOfStream&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strTemp = objFileToRead.ReadLine&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If strTemp &amp;lt;&amp;gt; "" Then&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToWrite.WriteLine(strTemp)&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToRead.Close()&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToWrite.Close()&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToRead = Nothing&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFileToWrite = Nothing&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objFSO = Nothing&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Label1.Text = "You haven't chosed any file"&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Label1.TextAlign = Drawing.ContentAlignment.MiddleCenter&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Label1.Left = (Me.Width - Me.Label1.Width) / 2&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-1411198709015064814?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/1411198709015064814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=1411198709015064814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1411198709015064814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1411198709015064814'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2011/10/remove-empty-rows-in-text-files-solved.html' title='Remove empty rows in text files? Solved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-4455157287872774174</id><published>2011-04-12T11:53:00.002+01:00</published><updated>2011-07-24T15:53:34.512+01:00</updated><title type='text'>Can't install .net framework 3.5? Solved</title><content type='html'>&lt;div style="color: red;"&gt;Updated&lt;/div&gt;Many people can't install .net framework 3.5. And I was one of them. After many attempts I solved the issue.&lt;br /&gt;I downloaded the &lt;b&gt;updated&lt;/b&gt; Aaron Stebner "dotfix cleanup tool" from &lt;a href="http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip"&gt;here&lt;/a&gt;&amp;nbsp; in the page top left and launched it. This tool clean your system from any net. framework trace. After cleanup you can safely install the .net framework 3.5. Maybe the Aaron Stebner dotfix cleanup tool fails at the first attempt.&lt;br /&gt;Then follow these steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download "Free Uninstaller 1.1" form this link: &lt;a href="http://www.anarchia.com/link_in_frame.php?link=4906&amp;amp;c="&gt;http://www.anarchia.com/link_in_frame.php?link=4906&amp;amp;c=&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Free Uninstaller 1.1 is a zip package.&amp;nbsp; Doesn't need installation.&lt;/li&gt;&lt;li&gt;Double click on it&lt;/li&gt;&lt;li&gt;Will appear some registry keys red highlighted on the top of the window&lt;/li&gt;&lt;li&gt;The red highlighted registry keys are invalid registry keys. Remove them.&lt;/li&gt;&lt;li&gt;Retry with the Aaron Stebner dotfix cleanup. &lt;/li&gt;&lt;/ol&gt;Now of course you'll be able to install .net framework 3.5.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-4455157287872774174?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/4455157287872774174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=4455157287872774174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4455157287872774174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4455157287872774174'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2011/04/cant-install-net-framework-35-solved.html' title='Can&apos;t install .net framework 3.5? Solved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-7277098762633683829</id><published>2011-04-05T15:16:00.000+01:00</published><updated>2011-04-05T15:16:35.937+01:00</updated><title type='text'>Update datagridview with numeric primary key. Solved</title><content type='html'>The issue, typical in Firebird, consist in the fact that, after you insert a new record&amp;nbsp; with an autoincrement field in a datagridview, we have to exit from the application to be able to edit the new inserted record.&lt;br /&gt;&lt;br /&gt;To solve this issue you have to proceed this way:&lt;br /&gt;1) Proceeding for semplicity with "SQL Manager 2010 lite" software, name the autoincrement field as "Counter"&lt;br /&gt;2) In the database of interest create a new table called for example "Counter" with only a field named "memcont", type Integer.&lt;br /&gt;3) To insert a record use this routine:&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;System.EventArgs) Handles Button1.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim ObjConnection As New FbConnection()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim connection As FbConnection = New &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #38761d;"&gt;' If we assume an embedded server&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;FbConnection("servertype=1;username=sysdba;password=masterkey;database=" _&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;connection.Open()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;' Starts a local transaction.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim fbTran As FbTransaction = connection.BeginTransaction()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;' Enlist the command in the current transaction.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim command As FbCommand = connection.CreateCommand()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.Transaction = fbTran&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.CommandText = _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;"insert into new_table1" _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&amp;amp; " (Clienti, spesa) values ('" &amp;amp; Me.TextBox1.Text &amp;amp; "','" &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;_&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&amp;amp; Me.TextBox2.Text &amp;amp; "')"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.CommandText = _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;"delete from counter"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;'There we make use of the generator GEN_ID function of Firebird with no increment&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.CommandText = _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;"INSERT INTO counter(memcont)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;VALUES(GEN_ID(new_table1_COUNTER_GEN, 0))"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;command.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;fbTran.Commit()&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;MsgBox("Insert a Integer number for field spesa")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;fbTran.Rollback()&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Finally&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjConnection.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;'There we create an instance of the new row in the datatable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim persRow As DataRow = &lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("counter").NewRow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;If IsDBNull(persRow("memcont")) Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;persRow("memcont") = &lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("New_table1").Rows.Count&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("counter").Rows.Add(persRow)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;'There we create an instance of the row 0 of the "counter" datatable&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim CustomersRow As DataRow = &lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("counter").Rows(0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;'There we create an instance of the new row of the "New_table1" &lt;/span&gt;&lt;span style="color: #009900;"&gt;datatable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim newCustomersRow As DataRow = &lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("new_table1").NewRow()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;' The autoincremnt field value musts reflect the "memcont" value +1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;newCustomersRow("counter") = CustomersRow("MEMCONT") + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;' there we assign to the unique record in the field "memcont" of the &lt;/span&gt;&lt;span style="color: #009900;"&gt;datatable "counter" the&lt;br /&gt;new value of the autoincrement field &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;CustomersRow("MEMCONT") = newCustomersRow("counter")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;newCustomersRow("CLIENTI") = Me.TextBox1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;newCustomersRow("spesa") = Me.TextBox2.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Principale.DataSet1.Tables("new_table1").Rows.Add(newCustomersRow)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Me.Close()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-7277098762633683829?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/7277098762633683829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=7277098762633683829' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/7277098762633683829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/7277098762633683829'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2011/04/update-datagridview-with-numeric_05.html' title='Update datagridview with numeric primary key. Solved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-8446109475340467718</id><published>2010-11-27T10:09:00.002+01:00</published><updated>2010-11-27T10:29:25.507+01:00</updated><title type='text'>Vb.net shows error but application works? How to solve the problem</title><content type='html'>Sometimes the datagridview control show error but the application works normally.&lt;br /&gt;in fact in these cases is sufficient to close the error message and the application works normally.&lt;br /&gt;However one wants that the error message isn't showed.&lt;br /&gt;To eliminate the error message:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Call the datagridview &lt;span style="color: rgb(51, 51, 255);"&gt;dataerror&lt;/span&gt; event&lt;/li&gt;&lt;li&gt;Insert in the event routine this code: &lt;span style="color: rgb(51, 51, 255);"&gt; e.Cancel = True&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Goodbye&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-8446109475340467718?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/8446109475340467718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=8446109475340467718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8446109475340467718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8446109475340467718'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/11/vbnet-shows-error-but-application-works.html' title='Vb.net shows error but application works? How to solve the problem'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-2368041314854054068</id><published>2010-11-13T17:07:00.001+01:00</published><updated>2010-11-14T08:26:28.732+01:00</updated><title type='text'>How to manage a  firebird database by fbembed.dll</title><content type='html'>There is around a very good tool to manage firebird databases. Its name is SQL Manager 2010 Lite for Interbase and Firebird. You can downdoad it for free from &lt;a href="http://www.softpedia.com/progDownload/EMS-IB-FB-Manager-Lite-Download-22779.html"&gt;http://www.softpedia.com/progDownload/EMS-IB-FB-Manager-Lite-Download-22779.html&lt;/a&gt;&lt;br /&gt;To manage any database install SQL Manager 2010 Lite for Interbase and Firebird.&lt;br /&gt;Now register a host:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I the toolbar click on "Register host" icon or from "Database" menu click on "Register host"&lt;/li&gt;&lt;li&gt;Will appear the "Register Host wizard"&lt;/li&gt;&lt;li&gt;From the "Host name" dropdown select "embedded" item. Insert username and password&lt;/li&gt;&lt;li&gt;In the "Client library" dropdown browse for the fbembed.dll and select it. Next.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Skip "Path to database utility". Click "Finish"&lt;/li&gt;&lt;/ul&gt;Now you can create databases, tables, execute sql scripts, etc.. in visual mode&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-2368041314854054068?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/2368041314854054068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=2368041314854054068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2368041314854054068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2368041314854054068'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/11/how-to-manage-firebird-database-by_13.html' title='How to manage a  firebird database by fbembed.dll'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-4408590626631416104</id><published>2010-10-29T12:16:00.004+01:00</published><updated>2011-12-03T16:45:58.239+01:00</updated><title type='text'>Using the MS ReportViewer control. Code. Displaiing search results</title><content type='html'>&lt;span style="color: #3366ff;"&gt;Private Sub AnteRicercaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RicercaTipoAnteToolStripMenuItem.Click&lt;br /&gt;&lt;br /&gt;If Me.txtTipo.Text = "" Or Me.txtRicerca.Text = "" Then&lt;br /&gt;MsgBox("Effettuare prima la ricerca", MsgBoxStyle.Critical)&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Report(My.Application.Info.DirectoryPath &amp;amp; "\AnteRicercaTipo.rdl", "Biblioteca")&lt;br /&gt;&lt;br /&gt;RepTipo.ReportViewer1.Refresh()&lt;br /&gt;&lt;br /&gt;RepTipo.Show()&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;Private Sub Report(ByVal filename As String, ByVal table As String)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;Dim RepDS As New ReportDataSource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;Dim dv As New System.Data.DataView&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;dv = DataSet1.Tables(table).DefaultView&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;RepDS.Name = "DataSource1"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;RepDS.Value = dv&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;RepTipo.ReportViewer1.LocalReport.DataSources.Clear()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;RepTipo.ReportViewer1.LocalReport.DataSources.Add(RepDS)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;RepTipo.ReportViewer1.LocalReport.ReportPath = filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3366ff;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Trying in google you will be able to find much documentation on how creating a report. In particular I council &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://msdn2.microsoft.com/it-it/library/ms159734.aspx&amp;amp;prev=/language_tools"&gt;this link&lt;/a&gt; for customizining layout of report and the &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://msdn2.microsoft.com/it-it/library/ms170246.aspx&amp;amp;prev=/language_tools"&gt;this link&lt;/a&gt; for a practice with ReportViewer.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;If you have of the problems with these articles you can contact me&lt;/span&gt;&lt;span style="color: black;"&gt; obviously.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;N.B.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Currently my acquaintances are limited to the type of report which I have created. Perhaps in future I will widen my acquaintances.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-4408590626631416104?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/4408590626631416104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=4408590626631416104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4408590626631416104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4408590626631416104'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/10/using-ms-reportviewer-control-code.html' title='Using the MS ReportViewer control. Code. Displaiing search results'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-7629981600885091063</id><published>2010-06-05T19:07:00.000+01:00</published><updated>2010-06-05T19:08:23.206+01:00</updated><title type='text'>VC 2008. Api win32. Errors with winbase.h? Problem solved</title><content type='html'>Hello friends,&lt;br /&gt;this morning it happened a strange thing with all my win32 Api projects. Earlier they worked, but this morning the Visual C++ 2008 compiler was getting about a hundred &lt;span class="POS2"&gt;of &lt;/span&gt;errors. Then I reinstalled Visual C++ 2008, but the same errors.&lt;br /&gt;Eventually I have seen that the WinBase.h in ..\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ directory was corrupted. Then I got the valid file WinBase.h. You download it by &lt;a href="http://galileo2007.altervista.org/downloads.htm"&gt;http://galileo2007.altervista.org/downloads.htm&lt;/a&gt;. The file is contained in WinBase.zip. Paste it just in ..\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ directory.&lt;br /&gt;Translated from: http://amici-di-galileo.blogspot.com/2010/03/api-win32-vc-2008-errori-dovuti.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-7629981600885091063?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/7629981600885091063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=7629981600885091063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/7629981600885091063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/7629981600885091063'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/06/vc-2008-api-win32-errors-with-winbaseh.html' title='VC 2008. Api win32. Errors with winbase.h? Problem solved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-9048804404829173207</id><published>2010-06-05T16:47:00.007+01:00</published><updated>2010-10-29T07:37:04.470+01:00</updated><title type='text'>Api win32. "Application has failed to start because the applicati..</title><content type='html'>Hello friends,&lt;br /&gt;sometimes I need light applications which, say, must  start at windows startup. In these cases I recur to  the win32 api .  But, with Visual c++ 2008 I encountered a difficulty which appeared to  be very hard to resolve: when I launched an api win32 application on a  machine without Visual c++ 2008, the application showed error and I was  requested of MSVCR90D.dll and MSVCR90.dll. On a winxp machine the message was "Application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."&lt;br /&gt;Finally I solved the issue this  way:&lt;br /&gt;In release mode:&lt;br /&gt;1)Project menu&gt;Project properties&gt;(if you don't see tree  menu scroll toward left)Linker&gt;Link Library Dependencies&gt;No&lt;br /&gt;2)Project  menu&gt;Project properties&gt;C/C++&gt;Code Generation&gt;Runtime  Library&gt;Multithread (/MT). (This way ). This setting produces a very light executable working in all machines&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You have to work always in release mode, because the application in  release mode may crash whereas in debug mode it compiles.&lt;/span&gt;&lt;br /&gt;Rarely may occur that, in release mode, the application compiles but crashes without&lt;br /&gt;noticing any error. In this case switch to debug mode and you will have more information about the errors. After the debug, switch over again to release mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-9048804404829173207?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/9048804404829173207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=9048804404829173207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/9048804404829173207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/9048804404829173207'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/06/api-win32-application-has-failed-to.html' title='Api win32. &quot;Application has failed to start because the applicati..'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-8783860421423497683</id><published>2010-02-23T11:38:00.009+01:00</published><updated>2010-08-04T07:41:49.651+01:00</updated><title type='text'>Api win32. Problem solved with MSVCR90D.dll and MSVCR90.dll</title><content type='html'>Hello friends,&lt;br /&gt;sometimes I need light applications which, say, must start at windows startup. In thees cases I recur to  the win32 apis . But, with Visual c++ 2008 I encountered a difficulty which appeared to be very hard to resolve: when I launched an api win32 application on a machine without Visual c++ 2008, the application showed error and I was requested of MSVCR90D.dll e MSVCR90.dll. Finally I solved the issue this way:&lt;br /&gt;In release mode:&lt;br /&gt;1)Project menu&gt;Project properties&gt;(if you  don't see tree  menu scroll toward left)Linker&gt;Link Library  Dependencies&gt;No&lt;br /&gt;2)Project  menu&gt;Project  properties&gt;C/C++&gt;Code Generation&gt;Runtime   Library&gt;Multithread (/MT). (This way ). This setting results a very  light executable working in all machines&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You have to work always in release mode, because the application  in  release mode may crash whereas in debug mode it compiles.&lt;/span&gt;&lt;br /&gt;Rarely may occur that, in release mode, the application compiles but crashes without&lt;br /&gt;noticing any error. In this case switch to debug mode and you will have more information about the errors. After the debug, switch over again to release mode.&lt;br /&gt;Goodbye!&lt;br /&gt;Translated from: http://amici-di-galileo.blogspot.com/2010/02/api-win32-problema-risolto-con-le_21.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-8783860421423497683?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/8783860421423497683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=8783860421423497683' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8783860421423497683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8783860421423497683'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2010/02/api-win32-problem-solved-with.html' title='Api win32. Problem solved with MSVCR90D.dll and MSVCR90.dll'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-1473776640861905370</id><published>2009-12-24T17:46:00.005+01:00</published><updated>2010-12-04T15:30:32.102+01:00</updated><title type='text'>Getting started with Express Reporting Services 2005</title><content type='html'>&lt;p&gt;Downloading and installation&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download SQLEXPR_TOOLKIT.EXE from &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=3C856B93-369F-4C6F-9357-C35384179543&amp;amp;displaylang=en"&gt;this page&lt;/a&gt; after you selected the languag&lt;/li&gt;&lt;li&gt;Download and install ODBC Firebird driver from &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=odbc"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Create a DSN: see &lt;a href="http://firebird-vbnet.blogspot.com/2009/10/howto-create-dsn.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;After the SQLEXPR_TOOLKIT.EXE the start menu  directory, between the others, the voice &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Microsoft Sql Server 2005&gt; Sql Server Business Development Intelligence Studio&lt;/span&gt;. Clic on it.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Will be opened “Visual Studio 2005” IDE . Up in the Standard bar of the instruments  clic on New Project, or in the Initial Page clic on Create Project. Give a name to the new project.&lt;/li&gt;&lt;li&gt;Will appear "New Project" window. In the left pane select "Business Intelligence Projects". In the right pane select "Server Report" wizard. Give e name tho the project. Ok. Now you'll see report wizard window. Clic next.&lt;/li&gt;&lt;li&gt;Now you have to set Data origin. Give it a name. From the combo "Type" select ODBC. Clic "edit". It will appear Connection properties window. Select "use connection string". Clic on "Generate" button. Ok. Will appear the connection string window. Next. Will appear Query project window. Write a simple query: &lt;span style="color: rgb(0, 0, 153);"&gt;select*from YourTable.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Next. In the window &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Select type of report&lt;/span&gt; select, for simplicity, &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Table&lt;/span&gt;. Next. In the window &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Planning Table &lt;/span&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;the&lt;/span&gt;&lt;/span&gt; fields of the table will appear to you, on the left side. Leave all as it is. Next. In the window &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Chose&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;table &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;style &lt;/span&gt;you can choose between the types of style listed, but it is clear that if you will not follow the guided procedure you can personalize as you want the styles of the report. Next. In the window &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Completion wizard&lt;/span&gt; you may give a name to your report. Therefore the end.&lt;/li&gt;&lt;li&gt;To add a new report, in explorer solutions select &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;Report &lt;/span&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;folder&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;and&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt; right clic Add&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(153, 102, 51);"&gt;report&lt;/span&gt;. you'll see report wizard window. Clic next. Now follow the steps from 9 to 10.&lt;/li&gt;&lt;/ol&gt;Therefore you have created your first one report with the Reporting Services. In the &lt;a href="http://firebird-vbnet.blogspot.com/2010/10/using-ms-reportviewer-control-code.html"&gt;http://firebird-vbnet.blogspot.com/2010/10/using-ms-reportviewer-control-code.html&lt;/a&gt; argument we will see how to use the report with the control reportviewer.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-1473776640861905370?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/1473776640861905370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=1473776640861905370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1473776640861905370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1473776640861905370'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/12/getting-started-with-express-reporting.html' title='Getting started with Express Reporting Services 2005'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-5613190420191844999</id><published>2009-12-18T17:13:00.003+01:00</published><updated>2010-03-26T18:41:11.484+01:00</updated><title type='text'>Reporting Services 2008 don't support reportviewer add in</title><content type='html'>I have realized that Reporting Services 2008 don't support &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=b67b9445-c206-4ff7-8716-a8129370fa1d"&gt;reportviewer add in&lt;/a&gt;. Particularly isn't possible pass the report parameters to the reportviewer because arises an exception for the &lt;span style="font-weight: bold;"&gt;setparameters&lt;/span&gt; method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-5613190420191844999?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/5613190420191844999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=5613190420191844999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5613190420191844999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5613190420191844999'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/12/reporting-services-2008-dont-support.html' title='Reporting Services 2008 don&apos;t support reportviewer add in'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-2979991859318524550</id><published>2009-12-02T17:15:00.017+01:00</published><updated>2010-05-10T17:00:15.476+01:00</updated><title type='text'>using report parameters in SSRS 2005</title><content type='html'>In this post we'll use report parameters to center an image in a reportviewer control.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;In the report project create the file Picture.rdl&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SSRS 2008&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  don't support&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; any reportviewer add in with reference to report parameters, this is a bug). To create a file rdl connected to firbird ODBC&lt;/span&gt; let see: &lt;a href="http://firebird-vbnet.blogspot.com/2009/12/getting-started-with-express-reporting.html"&gt;Getting started with Express Reporting Services 2005&lt;/a&gt;&lt;br /&gt;In the rdl file create two controls: image control and textbox control.&lt;br /&gt;From the menu choose Report &gt; Report Parameters command. Press Add to add a parameter.The value of a parameter can be used in expressions as Parameters!Foo.Value where Foo is the name of the parameter.&lt;br /&gt;To center an image in the report we'll make use of the image control "padding" property, because it lets use expressions.&lt;br /&gt;The "source" property have to be set: external&lt;br /&gt;The "sizing" property have to be set: fitProportional&lt;br /&gt;In order to select and center the image in the image control we'll make use of three parameters:&lt;br /&gt;P (text type)&lt;br /&gt;PadLeft (Integer type in points)&lt;br /&gt;PadRight (Integer type in points)&lt;br /&gt;&lt;br /&gt;As value of the left padding we have:&lt;span style="color: rgb(51, 51, 255);"&gt; =Parameters!PadLeft.value &amp;amp; "pt" &lt;/span&gt;&lt;br /&gt;As value of right padding we have: &lt;span style="color: rgb(51, 51, 255);"&gt;=Parameters!PadRight.value &amp;amp; "pt"&lt;/span&gt;&lt;br /&gt;As value of Value property we have: &lt;span style="color: rgb(51, 51, 255);"&gt;"file:///" &amp;amp; Parameters!P.Value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to write a caption we'll add to the report a large textbox control&lt;br /&gt;In order to write a caption in the textbox control we'll make use of a parameter:&lt;br /&gt;Caption&lt;br /&gt;As value of Value property we have: &lt;span style="color: rgb(51, 51, 255);"&gt;=Parameters!Caption.Value&lt;/span&gt;&lt;br /&gt;to show the report in Visual Basic we'll make use of a form with a reportviewer control in it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the Fprincipale form the code to show the image and caption in a reportviewer control  is:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Imports Microsoft.Reporting.WinForms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Private Sub Report(ByVal filename As String)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;        ShowReport.ReportViewer1.LocalReport.EnableExternalImages = True&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Dim strImage, strContesto As String, strPadleft, strPadRight As Integer&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Dim params(3) As ReportParameter&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        strImage = Me.DataGridView1.CurrentRow.Cells("Percorso").Value&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;strContesto = Me.DataGridView1.CurrentRow.Cells("Contesto").Value&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        image1 = New Bitmap(strImage, True)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;If (image1.Width / 72) * 2.54 &gt; 17  Or  (image1.Height / 72) * 2.54 &gt; 12.25 Then&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;strPadleft = (17 / 2.54 - 12.25 / 2.54 * (image1.Width / image1.HorizontalResolution) / (image1.Height / image1.VerticalResolution)) * 72 / 2&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;in this case the left and right padding have to be set so that the new image.width is resized by the ratio&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;(12.25 / 2.54)/&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;(image1.Height / image1.VerticalResolution)&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;br /&gt;strPadRight = strPadleft&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Else&lt;/span&gt;   &lt;span style="color: rgb(51, 51, 255);"&gt;      &lt;br /&gt;strPadleft = (17 / 2.54 - (image1.Width / 96)) * 72 / 2&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;in this case the image is resized with reference to screen resolution 96 DPI that is set by Windows OS. See &lt;a href="http://en.wikipedia.org/wiki/Dots_per_inch"&gt;Computer monitor DPI standards. &lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;When th DPI image resolution is lower than the computer monitor DPI standard, the image appears smaller with reference to its printer sizes. Then, since the image control fits proportionally an image with a given DPI resolution&lt;/span&gt;&lt;/span&gt;, we, to see the real image size in reportviewer, need to refer to &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;computer monitor DPI standard&lt;/span&gt;&lt;/span&gt;. Then say, 72*96/72=96, that is the number that apperars in the strPadLeft expression.&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strPadRight = strPadleft&lt;/span&gt;&lt;/span&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;End If&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;params(0) = New ReportParameter("P", strImage, False)&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;params(1) = New ReportParameter("Didascalia", strContesto, False)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;params(2) = New ReportParameter("PadLeft", strPadleft, False)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;params(3) = New ReportParameter("PadRight", strPadRight, False)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;        ShowReport.ReportViewer1.LocalReport.ReportPath = filename&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;        ShowReport.ReportViewer1.LocalReport.SetParameters(params)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Dim RepDS As New ReportDataSource&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Dim dv As New System.Data.DataView&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;dv = DataSet1.Tables("Immobili").DefaultView&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;RepDS.Name = "DataSource1"&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;        RepDS.Value = dv&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;ShowReport.ReportViewer1.LocalReport.DataSources.Clear()&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;        ShowReport.ReportViewer1.LocalReport.DataSources.Add(RepDS)&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;        ShowReport.ReportViewer1.LocalReport.ReportPath = filename&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;End Sub&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;br /&gt;Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Try&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;           &lt;br /&gt;Report(My.Application.Info.DirectoryPath &amp;amp; "\Picture.rdl")&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Catch&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;           &lt;br /&gt;MsgBox("Select a record")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            Exit Sub&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;End Try&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;ShowReport.Show()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    End Sub&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The related rdl report (Picture.zip) can be dowlaoded &lt;a href="http://galileo2007.altervista.org/downloads.htm"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;a href="http://galileo2007.altervista.org/downloads.htm"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-2979991859318524550?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/2979991859318524550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=2979991859318524550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2979991859318524550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2979991859318524550'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/12/using-report-parameters-in-ssrs-2005.html' title='using report parameters in SSRS 2005'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-4855957427463683552</id><published>2009-10-21T12:18:00.002+01:00</published><updated>2009-10-21T12:20:44.889+01:00</updated><title type='text'>IIS show error running ASP.net pages? Solved</title><content type='html'>Hello friends,&lt;br /&gt;I noticed my 5.1 IIS on windows xp not showing aspx pages. After some troubling, I found the cause of the issue: I needed uninstall and reinstall the .net framework.&lt;br /&gt;If you have many versions of framework installed on your machine you need a working unistalling freeware tool: dotnetfx cleanup. Here's the download page: &lt;a href="http://www.filestube.com/b7b587c2f858fd0203e9,g/dotnetfx-cleanup-tool.html"&gt;http://www.filestube.com/b7b587c2f858fd0203e9,g/dotnetfx-cleanup-tool.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-4855957427463683552?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/4855957427463683552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=4855957427463683552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4855957427463683552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4855957427463683552'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/10/iis-show-error-running-asp-pages-solved.html' title='IIS show error running ASP.net pages? Solved'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-742529254027550654</id><published>2009-10-19T11:13:00.015+01:00</published><updated>2010-12-02T19:25:37.714+01:00</updated><title type='text'>Howto create a DSN</title><content type='html'>Follow the next procedure: close VWD if opened.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First case. Client Server structure:&lt;/span&gt;&lt;br /&gt;First install a Firebird ODBC build from &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=odbc"&gt;Firebirdsql.org.&lt;/a&gt;&lt;br /&gt;Start&gt;Settings&gt;control Panel&gt;Administrative tools&gt;Data source OBDC&gt;"User DSN" tab&gt;Add button&gt;Select Firebird/Interbase(r) driver&gt;in the textbox "Data source name" insert a cutom name&gt;In Database textbox browse your database&gt;In client DLL browse fbclient.dll from your Firebird Application folder&gt;In user database textbox insert database admin username&gt;in "password" textbox insert admin password&gt;In "character set" combobox select NONE. Now test the connectiion&gt;Press the confirm button.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Second case. Embedded server&lt;/span&gt;:&lt;br /&gt;First install a Firebird ODBC build from &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=odbc"&gt;Firebirdsql.org.&lt;/a&gt;&lt;br /&gt;Seconf doowload embedded server package from &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=odbc"&gt;Firebirdsql.org.&lt;/a&gt; Unpack it in a custom folder.&lt;br /&gt;Start&gt;Settings&gt;control Panel&gt;Administrative tools&gt;Data  source OBDC&gt;"User DSN" tab&gt;Add button&gt;Select  Firebird/Interbase(r) driver&gt;in the textbox "Data source name" insert  a cutom name&gt;In Database textbox browse your database&gt;In client  DLL browse for fbembed.dll &lt;span style="font-weight: bold;"&gt;from the custom folder in which the embedded server has been unpacked&lt;/span&gt;&gt;In user  database textbox insert database admin username&gt;in "password"  textbox insert admin password&gt;In "character set" combobox select NONE. Now test the connection&gt;Press the confirm button.&lt;br /&gt;&lt;br /&gt;Goodbye.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-742529254027550654?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/742529254027550654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=742529254027550654' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/742529254027550654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/742529254027550654'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/10/howto-create-dsn.html' title='Howto create a DSN'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-8405028697344550204</id><published>2009-10-15T09:46:00.007+01:00</published><updated>2011-04-02T11:58:44.222+01:00</updated><title type='text'>Establishing a data connection for Asp.net page</title><content type='html'>With Visual Web Developer, from Microsoft:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://firebird-vbnet.blogspot.com/2009/10/howto-create-dsn.html" style="text-decoration: underline;"&gt;Create an ODBC data source for the database&lt;/a&gt;&lt;/li&gt;&lt;li&gt;In default.aspx web form drag and drop a Gridview control&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click on the top right of the Gridview control. Select "new data source". On the page will appear a window with various icons. Select "Database". Click OK.&lt;/li&gt;&lt;li&gt;Now 'll appear SqlDataSource1 control. Click on "New connection" button.&lt;/li&gt;&lt;li&gt;It'll appear a window. Click on Edit button and select "Other".  In the label It'll appear  ".Net Framework Data Provider for ODBC"&lt;/li&gt;&lt;li&gt;Below click the option button "Use connection string". Click on "Generate.." button, and select the tab "Computer data source". Then select your data source name. Then OK. Next.&lt;/li&gt;&lt;li&gt;Click on the "Specify a stored procedure or a customized SQL statement" option button. Otherwise you may get a token error message because of the square brackets for a string without white spaces.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You may use "select" statement. Write the select statement. Next. Click on "Test query" button.&lt;/li&gt;&lt;li&gt; Now you should see your table.&lt;/li&gt;&lt;li&gt; For further test start the debug.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-8405028697344550204?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/8405028697344550204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=8405028697344550204' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8405028697344550204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8405028697344550204'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/10/establishing-data-connection-for-aspnet.html' title='Establishing a data connection for Asp.net page'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-3557850026345649803</id><published>2009-05-21T09:33:00.030+01:00</published><updated>2011-08-10T09:01:47.232+01:00</updated><title type='text'>Resize form, controls, fonts</title><content type='html'>Updated.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You have to design the form with its size relative to minimum &lt;u&gt;user&lt;/u&gt; working area&lt;/span&gt;, because, at resolutions lower than this minimum, as you can see, the form may be &lt;span style="font-weight: bold;"&gt;forcedly&lt;/span&gt; resized  and the code cannot yet work.&lt;br /&gt;At &lt;u&gt;bottom&lt;/u&gt; of the form load event you have to put: ResizeFormClass.SubResize(Me, (form width &lt;u&gt;value&lt;/u&gt;/&lt;span style="color: #3366ff;"&gt;Screen.PrimaryScreen.WorkingArea.Width&lt;/span&gt; &lt;u&gt;value&lt;/u&gt;) * 100, (form height &lt;u&gt;value&lt;/u&gt; / &lt;span style="color: #3366ff;"&gt;Screen.PrimaryScreen.WorkingArea.Height &lt;span style="color: black;"&gt;&lt;u&gt;value&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;) * 100), &lt;span style="font-weight: bold;"&gt;at minimum user working area.&lt;/span&gt;&lt;br /&gt;For example, with minimum working area width=1024 ad minimum working area height=738 the code resizes right at 1152x864, 1280x1024 and at larger resolutions.&lt;br /&gt;&lt;br /&gt;If the form is maximized, below &lt;span style="color: black;"&gt;"ResizeFormClass.SubResize(Me,&amp;nbsp;&lt;/span&gt;form width &lt;u&gt;value&lt;/u&gt; / &lt;span style="color: #3366ff;"&gt;Screen.PrimaryScreen.WorkingArea.Width&lt;/span&gt;)&lt;span style="color: black;"&gt;,&amp;nbsp;&lt;/span&gt;form height &lt;u&gt;value&lt;/u&gt; / &lt;span style="color: #3366ff;"&gt;Screen.PrimaryScreen.WorkingArea.Height&lt;/span&gt;&lt;span style="color: black;"&gt;)" put "Me.WindowState = FormWindowState.Maximized&lt;/span&gt;", &lt;span style="font-weight: bold;"&gt;only at runtime.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For an example see &lt;span style="color: #993300;"&gt;Resize.zip&lt;/span&gt; at  &lt;a href="http://galileo2007.altervista.org/downloads.htm"&gt;http://galileo2007.altervista.org/downloads.htm&lt;/a&gt;&lt;br /&gt;In this example the minumum resolution assumed is 1024x780&lt;br /&gt;To resize, in a module paste the code below:&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;Module Module1&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Public Class ResizeFormClass&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;'Original form width.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared m_FormWidth As Long                          &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared m_FormHeight As Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Public Shared Sub SubResize(ByVal F As Form, ByVal percentW As Double, ByVal percentH As Double)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim FormHeight As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim FormWidth As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim HeightChange As Double, WidthChange As Double&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Call SaveInitialStates(F)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Calculate the new height and width the form needs to be resized to, based on the current avaible screen area.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            FormHeight = Int((Screen.PrimaryScreen.WorkingArea.Height) * (percentH / 100))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            FormWidth = Int((Screen.PrimaryScreen.WorkingArea.Width) * (percentW / 100))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Use the Form that is to be resized.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            With F&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                &lt;span style="color: #009900;"&gt;'Change the demensions and position of the form.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                .Height = FormHeight&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                .Width = FormWidth&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                HeightChange = .ClientSize.Height / m_FormHeight&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                WidthChange = .ClientSize.Width / m_FormWidth&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            End With&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Calculate ratio current avaible screen area/form size&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Notify the class that the form has been resized.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            SubChangeWithRatio(F, WidthChange, HeightChange)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;&lt;br /&gt;Private Shared Sub SaveInitialStates(ByVal F As Form)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Use the form that is being resized.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            With F&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                &lt;span style="color: #009900;"&gt;'Check if the form is a MDI form.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                &lt;span style="color: #009900;"&gt;'Set the FormWidth and FormHeight variables to the Form's Scale Width and Height.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                m_FormWidth = .ClientSize.Width&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                m_FormHeight = .ClientSize.Height&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            End With&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Public Shared Sub SubChangeWithRatio(ByVal F As Form, ByVal RapportoW As Single, ByVal RapportoH As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'uses a recursive routine&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            For Each ctl As Control In F.Controls&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                ResizeControlAndIncludedControls(ctl, RapportoW, RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared Sub ResizeControlAndIncludedControls(ByRef ctl As Control, ByVal RapportoW As Single, ByVal RapportoH As Single)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim ChildCtl As Control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            For Each ChildCtl In ctl.Controls&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                ResizeControlAndIncludedControls(ChildCtl, RapportoW, RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Next&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            ResizeControl(ctl, RapportoW, RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared Sub ResizeControl(ByRef ctl As Control, ByVal RapportoW As Single, ByVal RapportoH As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim lb As New ListBox, intlH As Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                If TypeOf ctl Is ListBox Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    lb = CType(ctl, ListBox)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    intlH = lb.IntegralHeight&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    lb.IntegralHeight = False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Left = CInt(ctl.Left * RapportoW)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Top = CInt(ctl.Top * RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Width = CInt(ctl.Width * RapportoW)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Height = CInt(ctl.Height * RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Left = CInt(ctl.Left * RapportoW)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Top = CInt(ctl.Top * RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Width = CInt(ctl.Width * RapportoW)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ctl.Height = CInt(ctl.Height * RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                lb.IntegralHeight = intlH&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                If TypeOf ctl Is ListView Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                        ResizeColumns(ctl, RapportoW, RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                    ResizeControlFont(ctl, RapportoW, RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared Sub ResizeControlFont(ByRef Ct As Control, ByVal RapportoW As Single, ByVal RapportoH As Single)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;'Resizes the control font and, in the case of some controls, as the listview&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            &lt;span style="color: #009900;"&gt;' resizes the columns also&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Dim FSize As Double = Ct.Font.Size&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Dim FStile As FontStyle = Ct.Font.Style&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Dim FNome As String = Ct.Font.Name&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Dim NuovoSize As Double = FSize&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                NuovoSize = FSize * Math.Sqrt(RapportoW * RapportoH)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Dim NFont As New Font(FNome, CSng(NuovoSize), FStile)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                Ct.Font = NFont&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Catch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Private Shared Sub ResizeColumns(ByRef ct As Control, ByVal RapportoW As Single, ByVal RapportoH As Single)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Dim c As ColumnHeader&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            For Each c In CType(ct, ListView).Columns&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;                c.Width = CInt(c.Width * RapportoW)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;    End Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Module&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-3557850026345649803?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/3557850026345649803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=3557850026345649803' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3557850026345649803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3557850026345649803'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2009/05/resize-form-controls-fonts.html' title='Resize form, controls, fonts'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-6305431185419781530</id><published>2007-03-13T11:17:00.000+01:00</published><updated>2007-03-13T14:53:56.483+01:00</updated><title type='text'>Found two bugs in Visual Basic express + SP1</title><content type='html'>The  properties rows of datagridview and visiblerows.count of datagrid&lt;br /&gt;mark 1 plus record. Done my signal to Microsoft.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-6305431185419781530?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/6305431185419781530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=6305431185419781530' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6305431185419781530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6305431185419781530'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/03/found-two-bugs-in-visual-basic-express.html' title='Found two bugs in Visual Basic express + SP1'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-6075276992109104684</id><published>2007-03-10T13:00:00.012+01:00</published><updated>2011-04-08T14:12:41.606+01:00</updated><title type='text'>Dbms Firebird and Vb.net</title><content type='html'>&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;span style="color: red;"&gt;Warning:&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #330033;"&gt;&lt;span style="color: black;"&gt;this article has been modified on&lt;/span&gt; &lt;span style="color: black;"&gt;17 February 2007&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0cm;"&gt;Dbms the Firebird offers excellent performances also regarding other famous dbms. Moreover it is free, it's wheight (very light) is around 14 mega. It has a client-server structure and as far as instructions SQL they follow the international standards.&lt;br /&gt;For a comparison with others dbms see &lt;a href="http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems"&gt;here&lt;/a&gt;&lt;br /&gt;The last setup for the classic server and superserver can be dowloaded &lt;a href="http://www.firebirdsql.org/index.php?op=files"&gt;&lt;span style="text-decoration: underline;"&gt;here&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;Firebird database can work also without main Server installed. In fact there is the embedded version of the server which you can download from &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=engine_250"&gt;here&lt;/a&gt;. The embedded version (very light) is particularly suitable for standalone applications. For the libraries and folder you which have to put in the target application folder see &lt;a href="http://firebird-vbnet.blogspot.com/2007/02/solved-issue-unable-to-load-dll-fbembed.html"&gt; http://firebird-vbnet.blogspot.com/2007/02/solved-issue-unable-to-load-dll-fbembed.html&lt;br /&gt;&lt;/a&gt;To work with .net applications Firebird needs the .net provider which you can download &lt;a href="http://netprovider.cincura.net/"&gt;here&lt;/a&gt;.&lt;br /&gt;Now is more easy to insert indexes and primary keys in the tables.&lt;br /&gt;As editors of SQL there are free applications. One freeware is &lt;span style="color: #996633; font-weight: bold;"&gt;SQL Manager 2010 lite for&lt;/span&gt; &lt;span style="color: #996633; font-weight: bold;"&gt;InterBase/Firebird.&lt;/span&gt; You can download it for free from: from &lt;a href="http://www.softpedia.com/progDownload/EMS-IB-FB-Manager-Lite-Download-22779.html"&gt;http://www.softpedia.com/progDownload/EMS-IB-FB-Manager-Lite-Download-22779.html&lt;/a&gt;. The other is &lt;span style="color: #993399;"&gt;&lt;span style="color: #996633; font-weight: bold;"&gt;IBEasy+ 1.5.2&lt;/span&gt;&lt;/span&gt; &lt;span style="color: black;"&gt;from&lt;/span&gt; &lt;a href="http://www.marc-grange.net/telecharger_en.htm"&gt;here&lt;/a&gt;. Once  installed &lt;span style="color: #993399;"&gt;&lt;span style="color: #996633; font-weight: bold;"&gt;IBEasy+&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #996633;"&gt;&lt;span style="color: black;"&gt;1.5.2 I &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;recommend to put in its application directory fbembed.dll, icuu30.dll, icuin30.dll and the icudt30.dll of an updated embedded firebird package.&lt;br /&gt;&lt;span style="color: #993399;"&gt;&lt;span style="color: #996633; font-weight: bold;"&gt;IBEasy+&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #996633;"&gt;&lt;span style="color: black;"&gt;1.5.2 may is useful to import database from other dbms.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style="color: #993399;"&gt;&lt;span style="color: black;"&gt;I council to import from Excel&lt;/span&gt;&lt;/span&gt; stylesheets. But we'll see how in this post: &lt;a href="http://firebird-vbnet.blogspot.com/2007/02/from-mdf-to-gdb-with-free-software.html"&gt;http://firebird-vbnet.blogspot.com/2007/02/from-mdf-to-gdb-with-free-software.html.&lt;br /&gt;&lt;/a&gt;&lt;span style="color: #993399;"&gt;&lt;span style="color: #996633; font-weight: bold;"&gt;SQL Manager 2010 lite&lt;/span&gt; &lt;span style="color: black;"&gt;is more complete&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #993399;"&gt;&lt;span style="color: black;"&gt;, even if it doesn't allow to import databases from other dbms.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;-The connection strings for Server and Superserver is: &lt;span style="color: #3333ff;"&gt;"servertype=1;username=sysdba;password=masterkey;database=" _&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;/span&gt;&lt;/div&gt;-The connection strin for embedded server is:  &lt;span style="color: #3333ff;"&gt;"servertype=0;username=sysdba;password=masterkey;database=" _&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;span style="color: #993399;"&gt;&lt;span style="color: black;"&gt;&lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.sqlmanager.net/products/ibfb/manager/%3Ffrom%3Dgoogle_ibmanager_firebird_s%26gclid%3DCKi18NPvr4kCFQ8VXgodMHGyMA&amp;amp;prev=/language_tools"&gt;&lt;span style="color: #330033;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-6075276992109104684?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/6075276992109104684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=6075276992109104684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6075276992109104684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6075276992109104684'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/i-database-firebird.html' title='Dbms Firebird and Vb.net'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-1320901946669081785</id><published>2007-03-07T12:00:00.000+01:00</published><updated>2007-12-30T10:27:41.889+01:00</updated><title type='text'>Firebird in applications shared in LAN net</title><content type='html'>&lt;p style="MARGIN-BOTTOM: 0.5cm"&gt;In the client applications in which more computer are connected in network&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;In the application project use a connection string like this “server=computer name where the server resides; username=user name ; password=user password; database= explicit path of the database in the server machine\mydb.gdb"&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;You have to install in the client machine the .net framework.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;You have also to copy on the in the client machine only the escecutable of the application and to install the FirebirdClient-2.0.1. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;You don't need install neither the Server of Firebird neither the client library in the client machine.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;If the server machine is firewalled let open the port n. 3050 in the firewall.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;There's no other you have to do.&lt;/p&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;&lt;/p&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-1320901946669081785?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/1320901946669081785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=1320901946669081785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1320901946669081785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1320901946669081785'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/firebird-in-applicazioni-condivise-in.html' title='Firebird in applications shared in LAN net'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-2101768698323730599</id><published>2007-03-04T11:15:00.005+01:00</published><updated>2008-05-10T09:29:39.457+01:00</updated><title type='text'>Firebird in applications not connected in network</title><content type='html'>&lt;p&gt;In order to distribute applications not connected in network but like installabile program on a whichever computer, use the following procedure:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Download ADO NET Provider &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.dotnetfirebird.org/download/&amp;amp;prev=/language_tools"&gt;FirebirdClient-2.0.1&lt;/a&gt; which installs the net classes of Firebird on every computer which must hold a VB.net application with Firebird.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Download the package &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.dotnetfirebird.org/download/&amp;amp;prev=/language_tools"&gt;Embedded Firebird &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Unzip this file.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the folder of the application “\bin\debug” copy from the previously unzipped package the libraries:&lt;br /&gt;- fbembed.dll&lt;br /&gt;- icuu30.dll&lt;br /&gt;- icuin30.dll&lt;br /&gt;- icudt30.dll&lt;br /&gt;- the folder “intl” and the folder "udf"&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the application project use a connection string like this: “servertype=1; username=user name; password=user password; database=” &amp;amp; My.Application.Info.DirectoryPath &amp;amp;” \mydb.gdb "&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the installation package insert the executable, the database, the libraries and the folder intl, which will be placed in the same target folder of the application.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;As installer I council CIS downloadable from &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.silvercybertech.com/italian/index.html&amp;amp;prev=/language_tools"&gt;http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.silvercybertech.com/italian/index.html&amp;amp;prev=/language_tools&lt;/a&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-2101768698323730599?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/2101768698323730599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=2101768698323730599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2101768698323730599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2101768698323730599'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/utilizzo-di-firebird-in-applicazioni.html' title='Firebird in applications not connected in network'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-6496382096493426470</id><published>2007-03-01T11:13:00.005+01:00</published><updated>2010-09-27T11:30:57.049+01:00</updated><title type='text'>Solved the issue "unable to load DLL fbembed .dll"</title><content type='html'>If you install Firebird server and open a database by Firebird server, download Fb embed package having the same release number as Firebird server. If you don't install a new Firebird server you don't have to download a new Fb embedded release for that database.  Anyway in application directory you have to copy:&lt;br /&gt;- fbembed.dll&lt;br /&gt;- icuu30.dll&lt;br /&gt;- icuin30.dll&lt;br /&gt;- icudt30.dll&lt;br /&gt;Also you have to copy the folders "intl" and "udf".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-6496382096493426470?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/6496382096493426470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=6496382096493426470' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6496382096493426470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6496382096493426470'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/02/solved-issue-unable-to-load-dll-fbembed.html' title='Solved the issue &quot;unable to load DLL fbembed .dll&quot;'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-5554634088808564384</id><published>2007-02-26T11:00:00.006+01:00</published><updated>2011-04-13T14:15:09.076+01:00</updated><title type='text'>Examples of code</title><content type='html'>I make the example of a table with 2 fields for semplicity: for the text fields use the type varchar which allows a better positioning of the cursor in edit mode.&lt;br /&gt;First add to the project the "Firebirdclient-ADO NET xx Data Provider" reference.&lt;br /&gt;In the connection string use servertype=1 for embedded server and servertype=0 for client server application.&lt;br /&gt;The Dataset is a component of VB.net and is not typified. The field “Clienti” is a field varchar. For “Spesa” field I have chosen the type smallint. We'll use 3 winforms for the project: "MainForm", "NewForm", "EditForm".&lt;br /&gt;The operations are there described with comments at the code:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;br /&gt;__________________________________________________________________&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Public Class MainForm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim Fdataa As New FbDataAdapter("select*from New_table1", "servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\Giorgio.gdb")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;DataSet1.Tables.Add("New_table1")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Me.DataGridView1.DataSource = DataSet1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Me.DataGridView1.DataMember = "New_table1"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Fdataa.Fill(DataSet1, "New_table1")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;NewForm.Show()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;'To begin the change&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;'I used the trim function because would be problems with positioning of the cursor if you will pass from &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;varcahr &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;type to char type and vice versa.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;EditForm.TextBox1.Text =&lt;br /&gt;&lt;span style="color: #009900;"&gt;&lt;/span&gt;&lt;br /&gt;Microsoft.VisualBasic.Trim(DataGridView1.CurrentRow.Cells(0).Value)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;EditForm.TextBox2.Text = DataGridView1.CurrentRow.Cells(1).Value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;EditForm.Show()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;&lt;br /&gt;'To delete a record&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim mResult&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim ObjConnection As New FbConnection()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;mResult = MsgBox("Si desidera eliminare questo cliente?", _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;vbYesNo + vbQuestion, "Conferma eliminazione")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;If mResult = vbNo Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjConnection.ConnectionString = "servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\miodb.gdb"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjConnection.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Dim ObjCommand As New FbCommand()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjCommand.Connection = ObjConnection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjCommand.CommandText = "delete from New_table1 where Clienti='" &amp;amp; Me.DataGridView1.CurrentRow.Cells(0).Value &amp;amp; "'"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjCommand.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Finally&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;ObjConnection.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;Me.DataGridView1.Rows.Remove(Me.DataGridView1.CurrentRow)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;End Class&lt;br /&gt;&lt;span style="color: #009900;"&gt;&lt;br /&gt;'To update a record&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;Imports FirebirdSql.Data.FirebirdClient&lt;br /&gt;______________________________________________________________&lt;br /&gt;Public Class EditForm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub btnAggiorna_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAggiorna.Click&lt;br /&gt;Dim customerRow() = MainForm.DataSet1.Tables("New_table1").Select("Clienti ='" &amp;amp; MainForm.DataGridView1.CurrentRow.Cells(0).Value &amp;amp; "'")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim ObjConnection As New FbConnection()&lt;br /&gt;&lt;br /&gt;ObjConnection.ConnectionString = "servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\miodb.gdb"&lt;br /&gt;ObjConnection.Open()&lt;br /&gt;Try&lt;br /&gt;Dim ObjCommand As New FbCommand()&lt;br /&gt;ObjCommand.Connection = ObjConnection&lt;br /&gt;&lt;br /&gt;ObjCommand.CommandText = "update New_table1 set Clienti='" &amp;amp; Me.TextBox1.Text &amp;amp; "', Spesa='" &amp;amp; Me.TextBox2.Text &amp;amp; "' where Clienti='" &amp;amp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt; MainForm.DataGridView1.CurrentRow.Cells(0).Value &amp;amp; "'"&lt;br /&gt;ObjCommand.ExecuteNonQuery()&lt;br /&gt;Finally&lt;br /&gt;ObjConnection.Close()&lt;br /&gt;End Try&lt;br /&gt;&lt;br /&gt;customerRow(0)("Clienti") = Me.TextBox1.Text&lt;br /&gt;customerRow(0)("Spesa") = Me.TextBox2.Text&lt;br /&gt;&lt;br /&gt;Me.Close()&lt;br /&gt;MainForm.Show()&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;&lt;br /&gt;'To insert e new record&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;Imports FirebirdSql.Data.FirebirdClient&lt;br /&gt;____________________________________________________________&lt;br /&gt;Public Class NewForm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;Dim ObjConnection As New FbConnection()&lt;br /&gt;&lt;br /&gt;ObjConnection.ConnectionString = "servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\miodb.gdb"&lt;br /&gt;ObjConnection.Open()&lt;br /&gt;Try&lt;br /&gt;Dim ObjCommand As New FbCommand()&lt;br /&gt;ObjCommand.Connection = ObjConnection&lt;br /&gt;ObjCommand.CommandText = "insert into New_table1 (Clienti, Spesa) values ('" &amp;amp; TextBox1.Text "','" &amp;amp; TextBox2.Text &amp;amp; "')"&lt;br /&gt;ObjCommand.ExecuteNonQuery()&lt;br /&gt;Finally&lt;br /&gt;ObjConnection.Close()&lt;br /&gt;End Try&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim newCustomersRow As DataRow = MainForm.DataSet1.Tables("New_table1").NewRow()&lt;br /&gt;newCustomersRow("Clienti") = TextBox1.Text&lt;br /&gt;newCustomersRow("Spesa") = TextBox2.Text&lt;br /&gt;MainForm.DataSet1.Tables("New_table1").Rows.Add(newCustomersRow)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Me.Close()&lt;br /&gt;MainForm.Show()&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;This code is worth for application not connected in net.&lt;br /&gt;For an application connected in net only change the things about which we have before spoken.&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: #009900;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-5554634088808564384?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/5554634088808564384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=5554634088808564384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5554634088808564384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5554634088808564384'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/esempi-di-codice.html' title='Examples of code'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-5808815141642793365</id><published>2007-02-23T10:45:00.002+01:00</published><updated>2008-05-10T09:40:29.407+01:00</updated><title type='text'>The autoincrement field</title><content type='html'>&lt;p style="MARGIN-BOTTOM: 0cm"&gt;&lt;span style="COLOR: rgb(153,51,153)"&gt;&lt;span style="COLOR: rgb(153,102,51)"&gt;&lt;span style="COLOR: rgb(0,0,0)"&gt;If you are setting an autoincrement field I council to do this with &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(153,102,51)"&gt;SQL Manager 2005 Lite for&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(153,102,51)"&gt;InterBase/Firebird. &lt;/span&gt;Edit the autoincrement field and in edit window, on thew left, at the voice Autoincrement&gt;Initial value&gt; put 0. &lt;span style="COLOR: rgb(153,102,51)"&gt;&lt;span style="COLOR: rgb(0,0,0)"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;&lt;span style="COLOR: rgb(153,102,51)"&gt;&lt;span style="COLOR: rgb(0,0,0)"&gt;If the table contains data follow this procedure:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Open the table with IBEasy&lt;/li&gt;&lt;li&gt;In the window which appears clic on "data export "&lt;/li&gt;&lt;li&gt;Export the table in XML or Excel format with IBEasy.&lt;/li&gt;&lt;li&gt;Put the autoincrement field at the bottom of the other fields.&lt;/li&gt;&lt;li&gt;Import with IBEasy the previous mentioned XML or Excel file.&lt;/li&gt;&lt;li&gt;Now put the autoincrement field in the position which you want in the table.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;At this point your table will have an autoincrement field with the records numbered.&lt;br /&gt;&lt;p style="MARGIN-BOTTOM: 0cm"&gt;&lt;span style="COLOR: rgb(153,51,153)"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(153,102,51)"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-5808815141642793365?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/5808815141642793365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=5808815141642793365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5808815141642793365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5808815141642793365'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/02/autoincrement-field.html' title='The autoincrement field'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-6229195554541256450</id><published>2007-02-17T08:00:00.005+01:00</published><updated>2008-05-10T09:42:34.894+01:00</updated><title type='text'>Also the eye wants its part</title><content type='html'>&lt;span style="COLOR: rgb(255,0,0)"&gt;Warning: &lt;span style="COLOR: rgb(0,0,0)"&gt;this article has been modified on 7 February 2007.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;You will have noticed that the fields of database Firebird 1.5.3 must have the form my_field or MYField and without accents or apex, or space as in "My Field".&lt;br /&gt;We can instead give to the field the form which we want: that is "My Field" or "Citta'" or other type, if we set for the database, as character set, charset UTF8, and we can make it if we use an other free software of management for Firebird called &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(153,51,0)"&gt;FlameRobin 0.7.6&lt;/span&gt; from SourgeForge.net &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://sourceforge.net/project/showfiles.php%3Fgroup_id%3D124340&amp;amp;prev=/language_tools"&gt;here&lt;/a&gt;. Pay attention, in the query in VB.net, to the way as the fields of which has been spoken over, are written in a SQL statement: in order to make an instruction update example , the instruction must be written therefore: &lt;span style="COLOR: rgb(51,51,255)"&gt;“update table set ""MY FIELD"" = 'Roma'"&lt;/span&gt;, which is the field which must be all in capital, and this works even if the last letters of the field are accented or with apostrophe. &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(153,51,0)"&gt;FlameRobin&lt;/span&gt; is useful also because it gives, more of the other software, one information detailed on the errors in the query. It remains plain which, for the other uses are convenient the other software of management which I have indicated before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-6229195554541256450?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/6229195554541256450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=6229195554541256450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6229195554541256450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6229195554541256450'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/anche-locchio-vuole-la-sua-parte.html' title='Also the eye wants its part'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-3606205616829108447</id><published>2007-02-14T07:01:00.004+01:00</published><updated>2011-01-11T17:03:17.470+01:00</updated><title type='text'>From mdf to gdb with free software</title><content type='html'>You need MS Reporting Services Express. First download an d install SQLEXPR_TOOLKIT.EXE from &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=3C856B93-369F-4C6F-9357-C35384179543&amp;amp;displaylang=en"&gt;this page&lt;/a&gt; after you selected the language.&lt;br /&gt;Follow this way: Start&gt;Programs&gt;Microsoft Visual Studio 2005&gt;Microsoft Visual Studio 2005. Will appear the initial page of Visual Studio 2005. In the initial page, if does exist a project, go on.  If does not exist a project create a new project. In solution explorer right clic on the project and select add&gt;new element. In the window which appear select wizard for new report. Next. Select new data origin&gt;Type=Microsoft Sql server&gt;Connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=path of the database;Connect Timeout=30;User Instance=True"&gt;Window query project"&gt;select*from YourTable&gt;Window Select Report type&gt;Table&gt;Window table project&gt;Will appear all fields of your table&gt;leave all as it is&gt;Next&gt;Window "Select table style"&gt;Select a style&gt;Window completion wizard&gt;textbox Report name&gt;give a name&gt;End&gt;Clic preview&gt;The table will appear&gt;Export&gt;Excel.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IBEasy 1.5.2&lt;/span&gt;&lt;br /&gt;When you open IBEasy 1.5.2 it shows error, but after it opens  correctly. If you want to remove the error message, put in this application directory:&lt;br /&gt;- fbembed.dll&lt;br /&gt;- icuu30.dll&lt;br /&gt;- icuin30.dll&lt;br /&gt;- icudt30.dll&lt;br /&gt;Now open IBEasy 1.5.2&gt;Open your database&gt;Create a new table&gt;Create corresponding fields&gt;Follow the instruction for import a table Excel by IBeasy guide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-3606205616829108447?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/3606205616829108447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=3606205616829108447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3606205616829108447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3606205616829108447'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/02/from-mdf-to-gdb-with-free-software.html' title='From mdf to gdb with free software'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-5398799482203204065</id><published>2007-02-08T11:05:00.000+01:00</published><updated>2007-03-18T12:16:50.927+01:00</updated><title type='text'>Firebird and the problem of the apex</title><content type='html'>Can exist in Firebird  records in which the apex appears: for example in CITTA'. In these cases Firebird does not accept the field. In order to avoid the problem you must double the apex. The function Replace for ex. can for this purpose be used in this way: &lt;span style="color: rgb(51, 51, 255);"&gt;“update Table set Field='" &amp; Replace (Textbox1.text, "'", "''") &amp;amp; "'" &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-5398799482203204065?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/5398799482203204065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=5398799482203204065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5398799482203204065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/5398799482203204065'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/02/firebird-e-il-problema-dellapice.html' title='Firebird and the problem of the apex'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-449985975957486827</id><published>2007-02-05T13:00:00.002+01:00</published><updated>2008-05-10T09:45:34.710+01:00</updated><title type='text'>Reporting Services: presentation</title><content type='html'>Already long time ago Reporting Services has been released in free version from Microsoft.&lt;br /&gt;&lt;br /&gt;From a article of &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.dotnethell.it/users/Brainkiller.aspx&amp;amp;prev=/language_tools"&gt;David De Giacomi&lt;/a&gt; on dotnethell.it (if you want to read the entire article &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.dotnethell.it/articles/SQLReportingServices.aspx&amp;amp;prev=/language_tools"&gt;see here)&lt;/a&gt;&lt;br /&gt;... &lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Crystal Reports and its limits&lt;/span&gt;&lt;br /&gt;Since many yaears in this field operates a very famous company wich produces a product called Crystal Reports. This product has been inserted in the suite Visual Studio.net of Microsoft for the development. In effects since from the first moment it has been an optimal movement, but in th utilize we notice limits of this product...&lt;br /&gt;Crystal is however an optimal product because it constructs Report of WinForms applications inside, WebForms and quite export given through Web Services. Already some time ago I wrote an article which showed some of its potentialities.&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Constructing a Report with ASP.NET and Crystal Reports&lt;/span&gt;&lt;br /&gt;Some of its limits are as an example not complete integration with .NET, in fact from the point of view Globalization/Internationalization personally I have found various difficulties.&lt;br /&gt;Moreover also triviality as export of the report in pdf demands a enough tortuous path…&lt;br /&gt;&lt;br /&gt;Perhaps the more interesting part for us is the Report Designer, is the tool integrated in Visual Studio .NET which allows to design us the Report and to connect them to our given bases (.NET DataSets)....&lt;br /&gt;Very mach important is the use of Reporting Services in Web Services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-449985975957486827?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/449985975957486827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=449985975957486827' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/449985975957486827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/449985975957486827'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/i-prossimi-argomenti-i-reporting.html' title='Reporting Services: presentation'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-8848376275250148640</id><published>2007-01-27T13:00:00.000+01:00</published><updated>2007-05-24T14:08:52.365+01:00</updated><title type='text'>Exporting a report without preview in Excel format</title><content type='html'>&lt;span style="color: rgb(51, 51, 255);"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;br /&gt;Imports Microsoft.Reporting.WinForms&lt;br /&gt;Imports System.IO&lt;br /&gt;Private Sub EsportaExcelToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EsportaExcelToolStripMenuItem.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        If Me.TextBox1.Text = "" Or Me.TextBox2.Text = "" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            MsgBox("Pereform before the search", MsgBoxStyle.Critical)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Label1.Visible = True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        '&lt;span style="color: rgb(0, 153, 0);"&gt;To visualize the label&lt;/span&gt;&lt;br /&gt;Me.Refresh()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Report(My.Application.Info.DirectoryPath &amp; "\EsportaExcel.rdl", "Biblioteca")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        EsportaExcel()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    &lt;span style="color: rgb(0, 153, 0);"&gt;'This statement is necessary to display e new report after precedent displaying   &lt;/span&gt;&lt;br /&gt;RepTipo.ReportViewer1.Reset()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Label1.Visible = False&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Private Sub Report(ByVal filename As String, ByVal table As String)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim RepDS As New ReportDataSource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim dv As New System.Data.DataView&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        dv = DataSet1.Tables(table).DefaultView&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepDS.Name = "DataSource1"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepDS.Value = dv&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepTipo.ReportViewer1.LocalReport.DataSources.Clear()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepTipo.ReportViewer1.LocalReport.DataSources.Add(RepDS)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepTipo.ReportViewer1.LocalReport.ReportPath = filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Private Sub EsportaExcel()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;       &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim warnings As Warning() = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim streamids As String() = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim mimeType As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim encoding As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim extension As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim bytes As Byte()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        bytes = RepTipo.ReportViewer1.LocalReport.Render("Excel", _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;          Nothing, mimeType, _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            encoding, extension, streamids, warnings)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim fs As New FileStream("c:\outputvb.xls", FileMode.Create)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        fs.Write(bytes, 0, bytes.Length)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        fs.Close()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-8848376275250148640?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/8848376275250148640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=8848376275250148640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8848376275250148640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/8848376275250148640'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/exporting-report-without-preview-in.html' title='Exporting a report without preview in Excel format'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-754595172710220744</id><published>2007-01-27T10:29:00.000+01:00</published><updated>2007-05-24T14:17:32.039+01:00</updated><title type='text'>Exporting a report without preview in PDF format</title><content type='html'>Here is the code to export a report in PDF format without preview:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports Microsoft.Reporting.WinForms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports System.IO&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Private Sub EsportaPDFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EsportaPDFToolStripMenuItem.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        If Me.TextBox1.Text = "" Or Me.TextBox2.Text = "" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            MsgBox("&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Perform before the search&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;", MsgBoxStyle.Critical)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Label1.Visible = True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Me.Refresh()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Report(My.Application.Info.DirectoryPath &amp; "\AnteRicercaTipo.rdl", "Biblioteca")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        EsportaPDF()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        RepTipo.ReportViewer1.Reset()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Label1.Visible = False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Private Sub Report(ByVal filename As String, ByVal table As String)&lt;br /&gt;&lt;br /&gt;       Dim RepDS As New ReportDataSource&lt;br /&gt;&lt;br /&gt;       Dim dv As New System.Data.DataView&lt;br /&gt;&lt;br /&gt;       dv = DataSet1.Tables(table).DefaultView&lt;br /&gt;&lt;br /&gt;       RepDS.Name = "DataSource1"&lt;br /&gt;       RepDS.Value = dv&lt;br /&gt;       RepTipo.ReportViewer1.LocalReport.DataSources.Clear()&lt;br /&gt;       RepTipo.ReportViewer1.LocalReport.DataSources.Add(RepDS)&lt;br /&gt;&lt;br /&gt;       RepTipo.ReportViewer1.LocalReport.ReportPath = filename&lt;br /&gt;&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;Private Sub EsportaPDF()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim warnings As Warning() = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim streamids As String() = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim mimeType As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim encoding As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim extension As String = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim bytes As Byte()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        bytes = RepTipo.ReportViewer1.LocalReport.Render("PDF", _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;          Nothing, mimeType, _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            encoding, extension, streamids, warnings)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Dim fs As New FileStream("c:\outputvb.pdf", FileMode.Create)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        fs.Write(bytes, 0, bytes.Length)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        fs.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-754595172710220744?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/754595172710220744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=754595172710220744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/754595172710220744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/754595172710220744'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/05/exporting-report-without-preview-in-pdf.html' title='Exporting a report without preview in PDF format'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-1072203635921614589</id><published>2007-01-27T09:00:00.001+01:00</published><updated>2011-11-17T13:03:03.778+01:00</updated><title type='text'>MS reportviewer. Printing a report without preview</title><content type='html'>&lt;span style="color: #3333ff;"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Imports Microsoft.Reporting.WinForms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Imports System.IO&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Imports System.Threading&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;Private Sub StampaRicercaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RicercaTipoStampaToolStripMenuItem.Click&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        If Me.TextBox1.Text = "" Or Me.TextBox2.Text = "" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            MsgBox("&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;Perform before the search&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;", MsgBoxStyle.Critical)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Label1.Text = "Attendere," &amp;amp; vbCr &amp;amp; "stampa in corso..."&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Label1.Visible = True&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Label2.Visible = True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Me.Refresh()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Report(My.Application.Info.DirectoryPath &amp;amp; "\AnteRicercaTipo.rdl", "Biblioteca")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        EsportaPDF()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Dim process As New Process()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.StartInfo.FileName = "C:\outputvb.pdf"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.StartInfo.CreateNoWindow = True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.StartInfo.Verb = "Print"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.Start()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        process.WaitForInputIdle()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Thread.Sleep(5000)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        If Not process.CloseMainWindow() Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;            process.Kill()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Label2.Visible = False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Label1.Visible = False&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        Me.WindowState = FormWindowState.Maximized&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;        RepTipo.ReportViewer1.Reset()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;    End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Report(ByVal filename As String, ByVal table As String)&lt;br /&gt;&lt;br /&gt;Dim RepDS As New ReportDataSource&lt;br /&gt;&lt;br /&gt;Dim dv As New System.Data.DataView&lt;br /&gt;&lt;br /&gt;dv = DataSet1.Tables(table).DefaultView&lt;br /&gt;&lt;br /&gt;RepDS.Name = "DataSource1"&lt;br /&gt;RepDS.Value = dv&lt;br /&gt;RepTipo.ReportViewer1.LocalReport.DataSources.Clear()&lt;br /&gt;RepTipo.ReportViewer1.LocalReport.DataSources.Add(RepDS)&lt;br /&gt;&lt;br /&gt;RepTipo.ReportViewer1.LocalReport.ReportPath = filename&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub EsportaPDF()&lt;br /&gt;&lt;br /&gt;'L'istruzione si mette altrimenti la label non viene visualizzata&lt;br /&gt;Dim warnings As Warning() = Nothing&lt;br /&gt;Dim streamids As String() = Nothing&lt;br /&gt;Dim mimeType As String = Nothing&lt;br /&gt;Dim encoding As String = Nothing&lt;br /&gt;Dim extension As String = Nothing&lt;br /&gt;Dim bytes As Byte()&lt;br /&gt;&lt;br /&gt;bytes = RepTipo.ReportViewer1.LocalReport.Render("PDF", _&lt;br /&gt;Nothing, mimeType, _&lt;br /&gt;encoding, extension, streamids, warnings)&lt;br /&gt;&lt;br /&gt;Dim fs As New FileStream("c:\outputvb.pdf", FileMode.Create)&lt;br /&gt;fs.Write(bytes, 0, bytes.Length)&lt;br /&gt;fs.Close()&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-1072203635921614589?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/1072203635921614589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=1072203635921614589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1072203635921614589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/1072203635921614589'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/printing-report-without-preview-acrobat.html' title='MS reportviewer. Printing a report without preview'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-3291454253329695530</id><published>2007-01-26T12:00:00.005+01:00</published><updated>2008-05-10T09:59:28.111+01:00</updated><title type='text'>Installation of applications which use ReportViewer</title><content type='html'>In all the installation which use roportviewer, in the folder destination of the following application you must install the DLLs: Microsoft.ReportVierer.Winforms.dll, Microsoft.ReportVierer.ProcessingObject.Model.dll, Microsoft.ReportViewer.Common.dll. Thoose DLLs can be installed installing the file ReportViewer.exe &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://www.microsoft.com/downloads/details.aspx%3Ffamilyid%3D8a166cac-758d-45c8-b637-dd7726e61367%26displaylang%3Den&amp;amp;prev=/language_tools"&gt;here&lt;/a&gt; from the site of Microsoft&lt;br /&gt;I know a free software installer which allows to make installations in sequence mode with a single installation package. The free software which creates this package is called Cyberinstaller, downloadable from &lt;a href="http://www.silvercybertech.com/english/download.html"&gt;here&lt;/a&gt;.&lt;br /&gt;If you are using other software for the installation which does not possess this functionality then you must execute this procedure in order to gain the DLLs about what I were speaking before:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;download indicated ReportVierewer.exe file like before indicated.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;open it with Winrar or softer similar. In Winrar you will find the ReportV1.cab file. Open it.&lt;/li&gt;&lt;li&gt;extract the file in a folder to pleasure.&lt;/li&gt;&lt;li&gt;In this folder you will find 4 files. Rinominate the FL_Microsoft_ReportViewer_Common_dll_117718_____X86.3643236F_ file in Microsoft.ReportViewer.Common.dll, the FL_Microsoft_ReportViewer_ProcessingObject_125592_____X86.3643 file in Microsoft.ReportVierer.ProcessingObject.Model.dll, the FL_Microsoft_ReportViewer_WebForms_dll_117720_____X86.364323 file in Microsoft.ReportVierer.Winforms.dll.&lt;/li&gt;&lt;li&gt;These three rinominated files you will insert, as I said, in the istallation folder of target application.&lt;/li&gt;&lt;/ol&gt;Good bye and good job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-3291454253329695530?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/3291454253329695530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=3291454253329695530' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3291454253329695530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/3291454253329695530'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/instalazione-di-applicazioni-che-fanno.html' title='Installation of applications which use ReportViewer'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-2106667394253589278</id><published>2007-01-25T12:00:00.003+01:00</published><updated>2008-05-10T10:02:59.959+01:00</updated><title type='text'>The issue of centering a report in the page in excel format</title><content type='html'>When you are exporting a report in excel format and want to center a table in the page, could find difficult to do it, because the width of the table in Excel change against the width which you have setted for the table when you created the report.&lt;br /&gt;I have notice that the ratio "width of table of excel/width whic you have setted for the table in the project" is nearest to 1.076. Therefore you must divide the width which you want for the table in excel format by this constant to obtain the width to set for of the table in the project, considering obviously the width of the margins of the report. After you have divided by 1.076 let have the shrewdness to reduce the width found for the table in the project by 1/10 of a millimetre because of the inevitable imprecision of the printer.&lt;br /&gt;Goodby and god job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-2106667394253589278?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/2106667394253589278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=2106667394253589278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2106667394253589278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2106667394253589278'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/issue-of-centering-report-in-page-in.html' title='The issue of centering a report in the page in excel format'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-2831025902039050544</id><published>2007-01-23T10:30:00.001+01:00</published><updated>2010-03-14T10:21:07.849+01:00</updated><title type='text'>How to populate a Listbox control by a table data</title><content type='html'>&lt;h3 class="post-title"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;amp;amp;oe=UTF-8&amp;amp;langpair=it%7Cen&amp;amp;u=http://firebird-vbnet.blogspot.com/2006/12/popolare-un-controllo-listbox.html&amp;amp;prev=/language_tools"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Guide MSDN does not propose one acceptable solution for this argument. With Firebird as database the things are different. The populate code for a Listbox is this (the names of the database and of the table or other it is clear that they may be personalized from you). The datasets are components of VB.net and are not typifyed:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Imports FirebirdSql.Data.FirebirdClient&lt;/span&gt;&lt;br /&gt;_____________________________________________________________&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim Fdataa1 As New FbDataAdapter("select*from tipo_di_opera", "servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\Biblioteca.gdb") &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DataSet2.Tables.Add("tipo_di_opera")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Fdataa1.Fill(DataSet2, "tipo_di_opera")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;For i As Integer = 0 To DataSet2.Tables("tipo_di_opera").Rows.Count - 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;            ListBox1.Items.Add(DataSet2.Tables("tipo_di_opera").Rows(i).Item(0))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        Next i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;        ListBox1.Sorted = True&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-2831025902039050544?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/2831025902039050544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=2831025902039050544' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2831025902039050544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/2831025902039050544'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2006/12/popolare-un-controllo-listbox.html' title='How to populate a Listbox control by a table data'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-6411494920076299554</id><published>2007-01-20T10:00:00.001+01:00</published><updated>2010-04-25T08:52:12.497+01:00</updated><title type='text'>Deleting multiple selected rows in a datagridview with only a clic</title><content type='html'>With this routine we can delete multiple selected rows with only a clic maybe after a search in the table. We have to clic on the      tooths in the leftmost of the datagridview.&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Private Sub DeleteSelecedRows()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim ObjConnection As New FbConnection()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim i As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim mResult&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;mResult = MsgBox("Want you really delete the selected records?", _&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;vbYesNo + vbQuestion, "Removal confirmation")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;If mResult = vbNo Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjConnection.ConnectionString = _ "servertype=0;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim ObjCommand As New FbCommand()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjCommand.Connection = ObjConnection&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;For i = Me.DataGridView1.SelectedRows.Count - 1 To 0 Step -1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjCommand.CommandText = "delete from mytable where counter='" &amp;amp; _ DataGridView1.SelectedRows(i).Cells("counter").Value &amp;amp; "'"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjConnection.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjCommand.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ObjConnection.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Me.DataGridView1.Rows.Remove(Me.DataGridView1.SelectedRows(i))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-6411494920076299554?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/6411494920076299554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=6411494920076299554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6411494920076299554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/6411494920076299554'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/03/deleting-with-only-clic-multiple.html' title='Deleting multiple selected rows in a datagridview with only a clic'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-592329370681931232</id><published>2007-01-17T11:00:00.001+01:00</published><updated>2008-02-17T09:10:40.074+01:00</updated><title type='text'>Firebird and the boolean data type</title><content type='html'>We know that Firebid hasn't a boolean data type. But with VB.net this isn't a problem.&lt;br /&gt;Now we'll make an axample of how manage a checkbox column in VB.net with Firebird.&lt;br /&gt;First we create a field smallint called for example "P" not null with field default=0 in the table.&lt;br /&gt;Next we cerate a new boolean column in a datgridview and assign to it the properties of visualization an resizing mode, proceeding in this way:&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Dim checkboxColumn As DataGridViewCheckBoxColumn = New DataGridViewCheckBoxColumn&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;With checkboxColumn&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.HeaderText = "P"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.Name = "P"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.FlatStyle = FlatStyle.Standard&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.CellTemplate = New DataGridViewCheckBoxCell()&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.CellTemplate.Style.BackColor = Color.Beige&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.DataPropertyName = "P"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;&lt;span style="COLOR: rgb(0,153,0)"&gt;'There we assign the numeric value corresponding to true and false value &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.TrueValue = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;.FalseValue = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;End With&lt;/span&gt;&lt;br /&gt;'&lt;span style="COLOR: rgb(0,153,0)"&gt;There we assign the position of the boolean column in the datagridview&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Me.DataGridView1.Columns.Insert(1, checkboxColumn)&lt;/span&gt;&lt;br /&gt;Next we use the DataGridView1_CellContentClick event of the datagridview to edit the boolean field:&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Private Sub DataGridView1_CellContentClick(ByVal sender As Object, _&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ByVal e As DataGridViewCellEventArgs) _&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Handles DataGridView1.CellContentClick&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Dim ObjConnection As New FbConnection()&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Dim checkboxColumn As DataGridViewCheckBoxColumn = New DataGridViewCheckBoxColumn&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjConnection.ConnectionString = "servertype=0;username=sysdba;dialect=3;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\Biblioteca.gdb"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjConnection.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Dim ObjCommand As New FbCommand()&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjCommand.Connection = ObjConnection&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjCommand.CommandType = CommandType.TableDirect&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;If DataGridView1.CurrentRow.Cells("P").Value = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjCommand.CommandText = "update Biblioteca set P=1 where counter='" &amp;amp; DataGridView1.CurrentRow.Cells("Counter").Value &amp;amp; "' and P=0"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjCommand.CommandText = "update Biblioteca set P=0 where counter='" &amp;amp; DataGridView1.CurrentRow.Cells("Counter").Value &amp;amp; "'"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjCommand.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Catch ex As FbException&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;MsgBox(ex.Message)&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;Finally&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;ObjConnection.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-592329370681931232?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/592329370681931232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=592329370681931232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/592329370681931232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/592329370681931232'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/vbnet-firebird-and-boolean-data-type.html' title='Firebird and the boolean data type'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-4434982166819054604</id><published>2007-01-14T11:00:00.005+01:00</published><updated>2010-07-08T11:07:50.128+01:00</updated><title type='text'>Database backup, restore, compact</title><content type='html'>&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;This is the code:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports FirebirdSql.Data.FirebirdClient&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Imports FirebirdSql.Data.Services&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;strong&gt;Backup of a database: code&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim n As FirebirdSql.Data.Services.FbBackup = New FirebirdSql.Data.Services.FbBackup()&lt;br /&gt;Dim fl As FirebirdSql.Data.Services.FbBackupFile = New FirebirdSql.Data.Services.FbBackupFile(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdk", FileLen(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"))&lt;br /&gt;n.BackupFiles.Add(fl)&lt;br /&gt;n.ConnectionString = "servertype=0;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;br /&gt;n.Execute()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;strong&gt;Restore a database: code&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim n1 As FirebirdSql.Data.Services.FbRestore = New FirebirdSql.Data.Services.FbRestore()&lt;br /&gt;Dim fl1 As FirebirdSql.Data.Services.FbBackupFile = New &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'These statements are necessary because on restart of the computer a runtime exception appear&lt;br /&gt;'The try-catch-finally block, otherwise, seems not work &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;On Error GoTo 1&lt;br /&gt;On Error Resume Next&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Dim cs As FbConnectionStringBuilder = New FbConnectionStringBuilder&lt;br /&gt;Dim restoreSvc As FbRestore = New FbRestore&lt;br /&gt;cs.UserID = "SYSDBA"&lt;br /&gt;cs.Password = "masterkey"&lt;br /&gt;cs.Database = My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;br /&gt;restoreSvc.ConnectionString() = cs.ToString&lt;br /&gt;restoreSvc.BackupFiles.Add(New _&lt;br /&gt;FbBackupFile(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdk",FileLen(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb")))&lt;br /&gt;restoreSvc.Verbose = True&lt;br /&gt;restoreSvc.PageSize = 4096&lt;br /&gt;restoreSvc.PageBuffers = 2048&lt;br /&gt;restoreSvc.Options = FbRestoreFlags.Replace&lt;br /&gt;FbConnection.ClearAllPools()&lt;br /&gt;restoreSvc.Execute()&lt;br /&gt;exit sub&lt;br /&gt;1:&lt;br /&gt;restoreSvc.Execute()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;strong&gt;Compact a database: code&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim n As FirebirdSql.Data.Services.FbBackup = New FirebirdSql.Data.Services.FbBackup()&lt;br /&gt;Dim fl As FirebirdSql.Data.Services.FbBackupFile = New FirebirdSql.Data.Services.FbBackupFile(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdk", FileLen(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"))&lt;br /&gt;n.BackupFiles.Add(fl)&lt;br /&gt;n.ConnectionString = "servertype=0;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;br /&gt;n.Execute()&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'These statements are necessary because on restart of the computer a runtime exception appear&lt;br /&gt;'The try-catch-finally block, otherwise, seems not work &lt;/span&gt;On Error GoTo 1&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Dim cs As FbConnectionStringBuilder = New FbConnectionStringBuilder&lt;br /&gt;Dim restoreSvc As FbRestore = New FbRestore&lt;br /&gt;cs.UserID = "SYSDBA"&lt;br /&gt;cs.Password = "masterkey"&lt;br /&gt;cs.Database = My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb"&lt;br /&gt;restoreSvc.ConnectionString() = cs.ToString&lt;br /&gt;restoreSvc.BackupFiles.Add(New _&lt;br /&gt;FbBackupFile(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdk", FileLen(My.Application.Info.DirectoryPath &amp;amp; "\mydb.gdb")))&lt;br /&gt;restoreSvc.Verbose = True&lt;br /&gt;restoreSvc.PageSize = 4096&lt;br /&gt;restoreSvc.PageBuffers = 2048&lt;br /&gt;restoreSvc.Options = FbRestoreFlags.Replace&lt;br /&gt;FbConnection.ClearAllPools()&lt;br /&gt;restoreSvc.Execute()&lt;br /&gt;exit sub&lt;br /&gt;1:&lt;br /&gt;restoreSvc.Execute()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;P.S.&lt;br /&gt;To see the database resized go in the database folder&gt;Menu on the top&gt;Visualize&gt;clic on "Update" item.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-4434982166819054604?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/4434982166819054604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=4434982166819054604' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4434982166819054604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/4434982166819054604'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2007/01/firebird-vbnet-database-backup-restore.html' title='Database backup, restore, compact'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6757116402343534658.post-787361738107069865</id><published>2007-01-08T11:00:00.002+01:00</published><updated>2008-09-23T17:00:52.647+01:00</updated><title type='text'>How to insert a date field in a firebird database</title><content type='html'>Fist create a date field called "Today" in a firebird database. Then insert the following code in the inserting routine of a record in the database:&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Dim ObjConnection As New FbConnection()&lt;br /&gt;Dim connection As FbConnection = New FbConnection("servertype=1;username=sysdba;password=masterkey;database=" &amp;amp; My.Application.Info.DirectoryPath &amp;amp; "\MyDb.gdb")&lt;br /&gt;connection.Open()&lt;br /&gt;&lt;span style="color:#009900;"&gt;' Start a local transaction.&lt;/span&gt;&lt;br /&gt;Dim fbTran As FbTransaction = connection.BeginTransaction()&lt;br /&gt;&lt;span style="color:#009900;"&gt;' Enlist the command in the current transaction.&lt;/span&gt;&lt;br /&gt;Dim command As FbCommand = connection.CreateCommand()&lt;br /&gt;Dim Sqlresult1 As Object&lt;br /&gt;command.Transaction = fbTran&lt;br /&gt;command.CommandText = "select cast('today' as date) from rdb$database"&lt;br /&gt;Sqlresult1 = command.ExecuteScalar&lt;br /&gt;command.CommandText = _&lt;br /&gt;"insert into new_table1" _&lt;br /&gt;&amp;amp; " (Today, Clienti, spesa, Domanda, Nota) values ('today','" &amp;amp; Replace(Me.TextBox1.Text, " '", "''") &amp;amp; "','" _&lt;br /&gt;&amp;amp; Me.TextBox2.Text &amp;amp; ",'" &amp;amp; Replace(Me.TextBox3.Text, "'", "''") &amp;amp; "','" &amp;amp; _&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Replace(Me.TextBox5.Text, "'", "''") &amp;amp; "')"&lt;br /&gt;command.ExecuteNonQuery()&lt;br /&gt;command.CommandText = _&lt;br /&gt;"delete from contatore"&lt;br /&gt;command.ExecuteNonQuery()&lt;br /&gt;command.CommandText = _&lt;br /&gt;"INSERT INTO Contatore(memcont) VALUES(GEN_ID(new_table1_CONTATORE_GEN, 0))"&lt;br /&gt;command.ExecuteNonQuery()&lt;br /&gt;fbTran.Commit()&lt;br /&gt;Dim persRow As DataRow = Principale.DataSet1.Tables("contatore").NewRow&lt;br /&gt;If IsDBNull(persRow("memcont")) Then&lt;br /&gt;persRow("memcont") = Principale.DataSet1.Tables("New_table1").Rows.Count&lt;br /&gt;End If&lt;br /&gt;Principale.DataSet1.Tables("contatore").Rows.Add(persRow)&lt;br /&gt;Dim CustomersRow As DataRow = Principale.DataSet1.Tables("contatore").Rows(0)&lt;br /&gt;Dim newCustomersRow As DataRow = Principale.DataSet1.Tables("new_table1").NewRow()&lt;br /&gt;newCustomersRow("contatore") = CustomersRow("MEMCONT") + 1&lt;br /&gt;CustomersRow("MEMCONT") = newCustomersRow("contatore")&lt;br /&gt;newCustomersRow("Today") = Sqlresult1&lt;br /&gt;newCustomersRow("CLIENTI") = Me.TextBox1.Text&lt;br /&gt;newCustomersRow("spesa") = Me.TextBox2.Text&lt;br /&gt;newCustomersRow("Domanda") = Me.TextBox3.Text&lt;br /&gt;newCustomersRow("Nota") = Me.TextBox5.Text&lt;br /&gt;Principale.DataSet1.Tables("new_table1").Rows.Add(newCustomersRow)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6757116402343534658-787361738107069865?l=firebird-vbnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firebird-vbnet.blogspot.com/feeds/787361738107069865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6757116402343534658&amp;postID=787361738107069865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/787361738107069865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6757116402343534658/posts/default/787361738107069865'/><link rel='alternate' type='text/html' href='http://firebird-vbnet.blogspot.com/2008/05/how-to-insert-date-field-in-firebird.html' title='How to insert a date field in a firebird database'/><author><name>Giovanni G</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_U3UhJd77DQo/Slg8qxoYzDI/AAAAAAAAAAU/8rTVfz9Aah0/S220/Fiona+May.jpg'/></author><thr:total>0</thr:total></entry></feed>
