Hi everyone,
I'm working on a little program which will insert aircraft's current latitude and longtitude to a mysql database. I am using visual basic 6. In VB I get the position data from FSUIPC as DOUBLE data type. But when I try to insert these data to the database I get a type missmatch error. The data types in mysql are DOUBLE as well. I also tried decimal and float in mysql but I got the same error message. What's the problem here? If anyone knows the answer I'd appreciate your help
edit:
I get the position from FSUIPC using these codes:
Dim latitude as Double
Dim longtitude as Double
Dim FakeLat As Currency
Dim FakeLon As Currency
Dim dwResult As Long
Call FSUIPC_Read(&H560, 8, VarPtr(FakeLat), dwResult)
Call FSUIPC_Read(&H568, 8, VarPtr(FakeLon), dwResult)
Call FSUIPC_Process(dwResult)
latitude = FakeLat * 10000#
latitude = latitude * 90# / (10001750# * 65536# * 65536#)
longtitude = FakeLon * 10000#
longtitude = longtitude * 360# / (65536# * 65536# * 65536# * 65536#)
Thank you