Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Benniit

@Benniit
About
Posts
7
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Convert/Read SQL Image field into pdf
    B Benniit

    Thanks for the reply. Please storing the pdf is not a problem but retrieving it is issue for now. Please how do I retrieve this line Me.Pic1.Image = Image.FromStream(ms) and convert it into pdf. This line of code was used to retrieve image file correctly and I used the same process to store a pdf file but the above code to retrieve is it is the problem. Thanks

    Dim strQuery As String = "Select ReceiptNo,Pic1 from BPA1 where ReceiptNo=@ReceiptNo"
    SQLCon1.Open()
    comFile = New SqlCommand(strQuery, SQLCon1)
    comFile.Parameters.AddWithValue("@ReceiptNo", Me.txtReceiptNo.Text.Trim)
    daFile = New SqlDataAdapter(comFile)
    daFile.Fill(taFile)
    If taFile.Rows(0).Item("Pic1") IsNot DBNull.Value Then
    Dim img() As Byte
    img = taFile.Rows(0).Item("Pic1")
    Dim ms As New MemoryStream(img)
    If img.Length <> "0" Then
    Me.Pic1.Image = Image.FromStream(ms)
    ' Me.txtPdfPath.Text = File.FromStream(ms)
    Else
    Me.Pic1.Image = Nothing
    End If
    End If

    Visual Basic database help csharp com

  • Convert/Read SQL Image field into pdf
    B Benniit

    Please I am using VB.net 2019 and Sql 2016 and I have the below codes which inserts the pdf into the database successfully. But retrieving it becomes a problem for me and that is not the case for an image. I want to convert and retrieve this line of code into pdf "Me.Pdf1.Image=Image.fromStream(ms)" which gives an exception because it is not an image but pdf in the database. Please help me. Thank

    OpenFileDialog1.ShowDialog()

    txtPdfPath.Text = OpenFileDialog1.FileName'PDf file uploaded here

    'Code to insert Pdf file and after connection has been established

    Dim ms1 As New MemoryStream

    frmBPA1.Pic1.Image.Save(ms1, frmBPA1.Pic1.Image.RawFormat)

    SqlQuery = "Insert into BPA1 (Pdf1)Values(@Pdf1)"

    com.Parameters.AddWithValue("@Pdf1", ms1.ToArray)

    com.CommandText = SqlQuery

    com.CommandType = CommandType.Text

    SQLCon.Open()

    com.ExecuteNonQuery()

    SQLCon.Close()

    'Code to retrieve the pdf file

    Dim strQuery As String = "Select df1 from BPA1"

    SQLCon1.Open()

    comFile = New SqlCommand(strQuery, SQLCon1)
    comFile.Parameters.AddWithValue("@ReceiptNo", Me.txtReceiptNo.Text.Trim)
    daFile = New SqlDataAdapter(comFile)
    daFile.Fill(taFile)
    If taFile.Rows(0).Item("Pic1") IsNot DBNull.Value Then
    Dim img() As Byte
    img = taFile.Rows(0).Item("Pdf1")
    Dim ms As New MemoryStream(img)
    If img.Length <> "0" Then
    Me.Pic1.Image = Image.FromStream(ms)
    ' Me.txtPdfPath.Text = File.FromStream(ms)
    End If

    Visual Basic database help csharp com

  • Watermark in Crystal report does not show
    B Benniit

    Please, I am using crystal report version 13 for Visual Studio 2019 and I followed the steps to create a watermark as follows I inserted the watermark image in the Page Header and went to Report > Section Expert and highlighted Page Header in list of sections on the left and marked the Underlay Following Sections checkbox and Clicked OK. I previewed the report but did not see any watermark. Please what could be the problem? I have tried so many means to get this done but to no avail. The wartermark refuses to show up. Please I need your help. Thanks.

    Visual Basic help csharp visual-studio question announcement

  • Setup Project not found in template
    B Benniit

    Sorry, wanted to type 2019 pls. Thanks for the correction.

    Visual Basic csharp help visual-studio workspace

  • Setup Project not found in template
    B Benniit

    Hello good people. Please I'm using Vb.net 2019 and I have a setup project in the solution explorer which I have packaged and installed on other machines and it works fine. About some fews weeks later, I realised the setup project was mysteriously unavailable and I tried to repackage using Add new Project. In the add a new Project window, I searched for setup in the template but nothing was found. I came to the main project and clicked on Extensions and found that Microsoft Visual Studio Installer Projects was still installed and ticked. I'm stuck and don't know what to do now. Please I need your urgent help. Thanks

    Visual Basic csharp help visual-studio workspace

  • Georeferencing
    B Benniit

    Hello Fellow Members, Please I work in a company where land/site plans are used. These plans have coordinates on them. I want these coordinates to be entered which Google will take you to the exact plot. In fact, any sample code or links will be welcomed. Thanks

    Visual Basic

  • Helpless to show multiple records on crystal report page separately
    B Benniit

    Good day, wonderful people of this forum. Please I am using crystal reports visual studio version CRforVS_13_0_15 and I am finding difficulty displaying the rows on separate pages. Displaying a row on a single page is not a problem. But let's say SQL query returns 30 records, these records should display on 30 pages separately. Which means every page will have different record. None of the fields is on the detail section. I appreciate your effort in advance. Many thanks

    Visual Studio 2015 & .NET 4.6 database csharp visual-studio help announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups