Thanks Erel
I think i have this part working here is the code
Dim in As InputStream
in = File.OpenInput(File.DirRootExternal, "sign.png")
Log("in "&in)
Dim out As OutputStream
out.InitializeToBytesArray(1)
Log("out "&out)
File.Copy2(in, out)
Dim data() As Byte
data = out.ToBytesArray
out.Close
in.Close
out.Flush
Dim ff As Int
ff=data.Length
Log(ff)
Dim xx As String
Dim bt As ByteConverter
xx=bt.CharsFromBytes(data)
Log(xx)
job2.Initialize("Job2", Me)
job2.PostString(ServerUrl, "Insert INTO test ([ECOLsignature]) VALUES ('" & xx & "' )")
Ok i have added the ByteConverter part to see whats in the string to make sure its not blank
Which it is not so i think it works.
this is the log (i have shortend the hex at ETC ETC ....)
System.Data.SqlClient.SqlException: Implicit conversion from data type varchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at ASP.test_aspx.Page_Load(Object sender, EventArgs ec) in e:\web\demitaservi\htdocs\test.aspx:line 26
Error: Internal Server Error
Now what i need to do is change the xx in the post string to data
but it will not compile
like this
job2.PostString(ServerUrl, "Insert INTO test ([ECOLsignature]) VALUES ('" & data & "' )")
this is the error
job2.PostString(ServerUrl, \
javac 1.6.0_26
\android\datainput.java:487: cannot find symbol
symbol : method NumberToString(byte[])
location: class anywheresoftware.b4a.BA
_job2._poststring(_serverurl,"Insert INTO test ([ECOLsignature]) VALUES ('"+BA.NumberToString(_data)+"' )");
I think it is sintax error in the post data part anybody know how to do this !!
Steve