Fdo2Fdo API

Fdo2Fdo API can be used as library for copying FDO Data sources.

It can be used in command line tools or .NET.

These are functions exported by API:

extern"C" FDO2FDO_API int F2F_CopyFdoToSDF(const wchar_t* ProviderName,const wchar_t* ConnectionProperties,const wchar_t* Classes,const wchar_t* Filter,const wchar_t* SdfFileName,bool Overwrite,long& NumCopied);

extern"C" FDO2FDO_API,int F2F_CopyFdoToSHP,(const wchar_t* ProviderName,const wchar_t* ConnectionProperties,const wchar_t* Classes,const wchar_t* Filter,const wchar_t* ShpFileName,bool Overwrite,long& NumCopied);

extern"C" FDO2FDO_API int F2F_CopyFdoToOracle(const wchar_t* ProviderName,const wchar_t* SourceConnectionProperties,const wchar_t* Classes,const wchar_t* Filter,const wchar_t* DestConnectionProperties,bool SkipSchemaCreation,long SRID,long& NumCopied);

extern"C" FDO2FDO_API int F2F_CopyFdoToFdo(const wchar_t* SourceProviderName,const wchar_t* SourceConnectionProperties,const wchar_t* DestProviderName,const wchar_t* Classes,const wchar_t* Filter, const wchar_t* DestConnectionProperties,bool SkipSchemaCreation,long& NumCopied);

extern"C" FDO2FDO_API int F2F_GetLastError( wchar_t* String,int BuffSize);

.NET Example:

public classFdo2FdoLibWrap{
[DllImport("Fdo2FdoApi.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern void F2F_GetLastError(StringBuilder Error,int BuffSize);
[DllImport("Fdo2FdoApi.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern int F2F_CopyFdoToSDF(String ProviderName, String ConnectionProperties, String Classes,String Filter, String SdfFileName, bool Overwrite, out long NumCopied);
}

{
String provider_name = "King.Oracle";
String conn_string = "Username=unittest;Password=unittest;Service=temp;OracleSchema=unittest";
String sdf_fname = "testsharp.sdf";
String classes = "UNITTEST~RAIL~GEOMETRY";

bool overwrite = true;
long numcopied;

int errnum = Fdo2FdoLibWrap.F2F_CopyFdoToSDF(provider_name, conn_string, classes, "",sdf_fname, overwrite, out numcopied);

if (errnum > 0)
{
StringBuilder errstr = new StringBuilder(512);
Fdo2FdoLibWrap.F2F_GetLastError(errstr, errstr.Capacity);
}
}

Copy Screenshots

FDO Toolbox

Oracle Toolbox