Wednesday, November 01, 2006

DBI In perl

Proper Syntex for dbi in perl

$con = DBI->connect("DBI:mysql:database","username","password",{RaiseError => 1})};
$var=$con->prepare(sqlquery);
$var->execute;
if (my @row = $var->fetchrow){
print $row[0];

}

Perl tips

If You are doing perl programming.when You start using print command.
put this text before it.
print "Content-type:text/html\n\n";

Thursday, December 22, 2005

Computer Programming

listbox control in visual basic

add a list box in your form

in form load section

list1.additem "item1"
list1.additem "item2
list1.additem "item3"

press f5 to run your application
see the in your form

Saturday, December 10, 2005

Computer Programming

Link Exchange Finder - The link exchange, link exchange

Computer Programming

connect Ado through Code in visual basic

Add refrence library Microsoft active data object 2.0 in your project
place this code in a module
function Db(byval Dbname as string ) as Adodb.connection
set db=new ADODB.Connection
with db.
.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbname
.connectionTimeout=30
.cursorLocation=Aduserclient
.open
end with
End Function

you can use it like
dim Ado as adodb.connection
set ado=db("test.mdb")
ado.execute("select * from cust")

Thursday, December 01, 2005

How to use MSChart Control in Visual Basic

With MSChaft Control you can Draw Chart of specified Data.You can also drew chart from Excel Worksheet.

Open a new project.
press Ctrl+t.
select Microsoft Chart Control6.0(OLEDB)

Drag this control on your form.

Draw A Command button

Private Sub Command1_Click()
Dim arrPrices(1 To 10)
Dim i As Integer
For i = 1 To 10
arrPrices(i) = i * 2
Next i
MSChart1.ChartData = arrPrices
End Sub

press f5 to run project
and press command button to see chart.