Using Firebird with ASP.net


In my previous post, I was able to connect a firebird 2.0 database to asp.net using controls. The next goal was to connect to a firebird database using the firebird.net engine and using the repeater control. I however, was able to use the firebird.net engine to connect to the firebird database but not to the repeater control. I used the html table tag. I've created a simple asp.net demo displaying the contents of a firebird database on page load. Here are the steps:

1. Things Needed:
  • Firebird 2.0 Server
  • Firebird 2.0 Client
  • Visual Web Developer
2. In Visual Web Developer, create a new ASP.net Website (using C# as the programming language). The project will have a default page named Default.aspx. Make sure that the code is separate from the page (ex. Default.aspx.cs is separate from Default.aspx)
3. On the Website menu, click on Add Reference.

4. Select the Firebird - ADO.net 2.0 Data Provider and click Ok.
5. Add using FirebirdSql.Data.FirebirdClient; to the "using" section;
6. On the Solution Explorer, double click on Default.aspx.cs.















The following code should appear.


















7. Paste the following in the Page_Load event:

FbConnection fbCn = new FbConnection("Database=;Server=localhost;User=SYSDBA;Password=masterkey;");
FbDataAdapter fbDa = new FbDataAdapter();
FbCommand fbCmd = new FbCommand();
DataTable dt = new DataTable();

fbCn.Open();
fbCmd = new FbCommand("select * from \"TableName\"", fbCn);
fbDa = new FbDataAdapter(fbCmd);
fbDa.Fill(dt);
this.GridView1.DataSource = dt;
this.Repeater1.DataSource = dt;
Response.Write("< r =" 1;" cellspacing =" 1;" cellpadding="1">");
for (int j = 0; j <>" + dt.Columns[j].ToString() + "< / t d >");
for (int i = 0; i <>");
for (int j = 0; j <>" + dt.Rows[i][j].ToString() + "< / t d >");
Response.Write("< / t r >");
}
Response.Write("< / t a b l e >");

8. The output of my database contains the following:

New Layout

I'm picking a new template. I don't think the previous layout was readable enough. I'm practicing on making things neat. I'm quite lazy with the designs hehehe.

My page rank dropped

Apparently, I still don't understand the world of SEO. My PR in this blog dropped from PR 3 to nothing and I still don't know the reason why. The only thing I can think of is that I did something that violated some terms with Google. Maybe this blog is banned. I think I submitted this blog more than thrice in Google's directory. I hope I can get it back. I'm not in the mood for link building right now. I still have to work on the contents. :D


Seminar on Open Source Applications at Brokenshire

Yesterday, we went to Brokenshire College of Davao for a seminar on Open Source Applications. I was accompanied by three senior students (only three because they didn't allow more than that). The seminar talked about Ubuntu Linux, Open Office.org, GIMP, and Blender. The funny thing is that it turned out to be one of my students' show as he (ragingmon) was popular with blender. :D

From Seminar on Open Source Applications October 23, 2008

From Seminar on Open Source Applications October 23, 2008

From Seminar on Open Source Applications October 23, 2008

From Seminar on Open Source Applications October 23, 2008

DigitalFilipino.com club and Davao Bloggers Networking Event

The event was fun. The food was free and I get to drink Gloria Jean's coffee. :D (More pictures when you click the photos. Photos courtesy of Mr. Raphael Banta)

From DigitalFilipino.com club and Davao Bloggers Networking Event


From DigitalFilipino.com club and Davao Bloggers Networking Event


From DigitalFilipino.com club and Davao Bloggers Networking Event


From DigitalFilipino.com club and Davao Bloggers Networking Event

Teaching Thinking Seminar

It was quite an interesting seminar. It's about teaching students to think. The speaker was from Singapore (I'm an idiot in remembering names sigh). Well, just wanted to share some pictures (Sorry for the low quality).

Seminar on Open Source Applications

there's a seminar on open source apps on Oct. 23 1-5 pm brok avr1. food and freebies on the house. with certificate. At most 3 students only.

Comodo

I have used Comodo products before and I was glad because it's free. I used their AntiVirus and Firewall. The firewall worked good. It had all the minimum requirements I expected a firewall should have. The best part of it is that it's free! Well, I was quite disappointed with the antivirus. Although it worked fine in detecting viruses, it didn't work as effectively as the free AVG. The worst experience I had was when the antivirus caused some corruption in one of the windows system file. I removed both products. But then recently, I saw a very impressive improvement of Comodo. Although they aren't still at the top 10 antivirus softwares, it's good to know that major sites use one of their products for Internet security. Take for example the dotPh Philippine domain registry. They are using Comodo's Positive SSL for Trusted Internet. For a service provider to use it means high reliability. This gets me into considering Comodo back to my computers.
I'll be starting with the Firewall as I am not comfortable using the built-in Windows Firewall. Next on my list is their Anti-Malware. I currently use RRT but it's not the full edition and it keeps on showing their site whenever I close their GUI. Well, as for the anti-virus, I'm currently using Nod32 and will be testing Comodo slowly enough.