SQl retrieve image problem

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Nov 12, 2008.

  1. Cableguy

    Cableguy Expert Licensed User

    HI Guys.....

    Thanks to Modules Im using a specific mdule to cope with the command to and data from a database...

    I Have this sub:

    Public Sub Get_Assinatura(Nome,Destino)
    cmd.CommandText = 
    "SELECT Assinatura FROM Tecnicos Where Nome='"&Nome&"'"
    Data.Value = cmd.ExecuteReader
    Control(Destino).Image= Data.GetImage(0)
    End Sub
    This is called by the following line:

    AssImage is an image control...

    But this doesn't work...
  2. agraham

    agraham Expert Licensed User

    You don't say in what way it doesn't work or what error, if any, you get but here's a guess. You might need to qualify the Image control name with the module it belongs in otherwise Basic4ppc assumes it is in the module where the code is defined.

    BaseDados.Get_Assinatura(Table1.Cell("Nome",Table1 .SelectedRow),[COLOR="Red"][B]Main.[/B][/COLOR]AssImage)
    EDIT :- You might need to qualify the other names as well.
  3. Cableguy

    Cableguy Expert Licensed User

    That, and a small typo, solved my issue, also added the control type.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice