08/06/2014

How to Insert Image in SQL Database? Vb.Net Code


            Dim fInfo As New FileInfo(TxtImagePath.Text)
            Dim len As Long = fInfo.Length
            Dim stream As New FileStream(TxtImagePath.Text(), FileMode.Open)
            Dim imgData() As Byte = New Byte(Convert.ToInt32(len - 1)) {}
            stream.Read(imgData, 0, len)
            Dim Mycon As New SqlConnection(con)
            Mycon.Open()
            Dim cmd As SqlCommand
            Dim rowsaffected As Integer
            If BtnSave.Text = "&Update" Then
                cmd = New SqlCommand("sptbltrainees_DetailUpdate", Mycon)
                cmd.CommandType = CommandType.StoredProcedure
                cmd.Parameters.AddWithValue("@PISNO", txtPisNo.Text)
                cmd.Parameters.AddWithValue("@Rank", CbRank.SelectedIndex)
                cmd.Parameters.AddWithValue("@Name", TxtName.Text)
                cmd.Parameters.AddWithValue("@Organisation", CbOrg.SelectedIndex)
                cmd.Parameters.AddWithValue("@Unit", CbUnit.Text)
                cmd.Parameters.AddWithValue("@Image", imgData)
                rowsaffected = cmd.ExecuteNonQuery
                MessageBox.Show(rowsaffected.ToString & "  - row(s) Updated")
                BtnEdit.Enabled = True
                GroupBox1.Enabled = False
                BtnAdd.Enabled = True
                BtnDelete.Enabled = True
                BtnFind.Enabled = True
                BtnSave.Enabled = False
                BtnSave.Text = "&Save"
            Else
                cmd = New SqlCommand("sptbltrainees_DetailInsert", Mycon)
                cmd.CommandType = CommandType.StoredProcedure
                cmd.Parameters.AddWithValue("@PISNO", txtPisNo.Text)
                cmd.Parameters.AddWithValue("@Rank", CbRank.SelectedIndex)
                cmd.Parameters.AddWithValue("@Name", TxtName.Text)
                cmd.Parameters.AddWithValue("@Organisation", CbOrg.SelectedIndex)
                cmd.Parameters.AddWithValue("@Unit", CbUnit.Text)
                cmd.Parameters.AddWithValue("@Image", imgData)
                rowsaffected = cmd.ExecuteNonQuery
                MessageBox.Show(rowsaffected.ToString & "  - row(s) added")

04/06/2014

Ambiguous column name error in SQL, how do I fix it

Ambiguous column error generally occurred while joining two or more table and where more than one table has same column name so to avoid such error just refer the table name and column name all together so instead of writing trg_PIS_No I have replaced it with tblemployee.trg_PIS_No and the error was fixed and my query is working fine.

06/05/2014

How and from where to purchase Motorola Moto E smart phone.

Motorola has launched a new low cost smart phone namely Motorola MOTO E. this smart phone is presently available on Flipkart. The initial quoted price is Rs.8999. So for the purchasing this, a person is required to place his order on flipkart and get the mobile delivered. Placing an order on flipkart is very easy and it is a very reliable portal . Not only Moto E you can purchase any thing just put your items and select category in above shown flipkart search bar and click on search and select the items and follow other purchasing activities as per text direction of flipkart web site

04/05/2014

How to make partial payment from net banking and rest from Credit card on flipkart.

I had tried to purchase a mobile phone from Flipkart. As I had some amount in my bank account so I decided to make partial payment from my net banking and remaining payment  I planned to make it in installment from my credit card. But there is no such option available on Flipkart. As after doing lots of research works and reading many review I had decided to purchase Moto G mobile  but due to non availability of any such option I decided to call there call center and when I called their call center they given me a ready in direct solution and by that way I made partial payment from my net banking and remaining payment I made in installment  from my credit card. The in direct solution to my payment was that i have to purchase e-gift voucher from flipkart for the amount which I want to pay from my net banking and then I used that e gift voucher for purchasing my article and remaining portion of amount I had made it from my credit card. Before doing all this you must ensure that the amount which you want to pay in installment  through credit card must more than four thousand other wise Flipkart will not give installment or EMI falicilities on credit card for amount below four thousand. How do I buy / gift an e-Gift Voucher? or  for other inquiry please click here 



10/01/2014

Best way to Monetize your web page/blogs !

Earn great money with Freelancer.com freelance ads!


Freelance.com affiliate advertising program FreelancerCash is the best way to monetize traffic on the Internet! Sit back and earn great $$$ without doing anything! Simply add our ad blocks to your website or blog and you'll earn 90% of project fees generated from users who click through the links. That's right 90% of project fees!.
Getting started is quick! Simply select one of the great ad units below and start earning money today! All you need is an account with Freelancer.com which is free! If you don't have one, sign up now.
You earn money instantly as jobs are fulfilled and paid for on our network. No need to wait 45-90 days to get paid like other programs! No "smart pricing" of clicks, if we make money, you make money, and you make the lion's share. This program is absolutely free to join. Get going now!

Advantages of FreelancerCash include:


  • It's simple to get going - just cut and paste the code!
  • We pay out 90% of project fees!
  • You get paid for both projects posted by employers and fees generated from freelancers
  • You get paid instantly; no waiting 45-90 days. The second we get paid - you do!
  • The format is familiar, can easily replace where Adsense isn't performing
  • Potential to earn big $$$ - on a $1000 project you make $90!
  • No "smart pricing" like other programs which wither away earnings!
  • All you need is a Freelancer.com account, which is freesign up now if you don't have one!