SQl retrieve image problem

Cableguy

Expert
Licensed User
Longtime 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:

B4X:
Public Sub Get_Assinatura(Nome,Destino)
cmd.CommandText = "SELECT Assinatura FROM Tecnicos Where Nome='"&Nome&"'"
Data.Value = cmd.ExecuteReader
Data.ReadNextRow
Control(Destino).Image= Data.GetImage(0)
End Sub

This is called by the following line:
BaseDados.Get_Assinatura(Table1.Cell("Nome",Table1.SelectedRow),AssImage)

AssImage is an image control...

But this doesn't work...
Help?!?!?
 

agraham

Expert
Licensed User
Longtime 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.

B4X:
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.
 

Cableguy

Expert
Licensed User
Longtime 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.

B4X:
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.

That, and a small typo, solved my issue, also added the control type.
 
Top