Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException with Connection.GetSchema [DNET501] #485

Closed
firebird-automations opened this issue May 16, 2013 · 9 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Pavel (hellboy)

I try to use GetSchema in FirebirdClient-NETCF-2.5.2:

command.Connection.GetSchema("Generators"); - NullReferenceException Exception

at FirebirdSql.Data.Schema.FbSchemaFactory.GetSchema(FbConnection connection, String collectionName, String[] restrictions)
at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.GetSchema(String collectionName, String[] restrictions)
at FirebirdSql.Data.FirebirdClient.FbConnection.GetSchema(String collectionName, String[] restrictions)
at FirebirdSql.Data.FirebirdClient.FbConnection.GetSchema(String collectionName)

// Also the same exception:
DataTable parmsDataTable = connection.GetSchema("procedurearameters", new string[] { null, null, spName });
return parmsDataTable.Rows.Count;

// Also the same exception:
FbCommandBuilder.DeriveParameters(command);

Tests runs on real device with WinCE 6.0

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Try it with the latest version and report back.

@firebird-automations
Copy link
Author

Commented by: Pavel (hellboy)

But I use the last available build (2.5.2) for .NET Compact Framework!

Date: 14.02.2010 16:44
Size: 376.320 Bytes

@firebird-automations
Copy link
Author

Commented by: @cincuranet

That's the latest build for CF. The latest version is 3.0.2.

@firebird-automations
Copy link
Author

Commented by: Pavel (hellboy)

Can I use 3.0.2 with Compact Framework?

This issue is affected only for Compact Framework build, not for Full framework!

@firebird-automations
Copy link
Author

Commented by: @cincuranet

You'll have to build it yourself. Currently the project stopped creating CF builds.

@firebird-automations
Copy link
Author

Commented by: Pavel (hellboy)

I have compiled Version 2.6.0 myself.

The main problem is that in FirebirdClient.dll for Compact Framework there is no FirebirdSql.Schema.FbMetaData.xml included as embedded resource!!

FbSchemaFactory.cs:

public static DataTable GetSchema(FbConnection connection, string collectionName, string[] restrictions):

Stream xmlStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(ResName); // ResName = 'FirebirdSql.Schema.FbMetaData.xml', xmlStream is null

DataRow[] collection = ds.Tables[DbMetaDataCollectionNames.MetaDataCollections].Select(filter);

@firebird-automations
Copy link
Author

Commented by: Pavel (hellboy)

Yes! Of course!

In FirebirdClient for CompactFramework there are missing resources;

// FirebirdSql.Entity.StoreSchemaDefinition.ssdl (Embedded, Public)

// FirebirdSql.Entity.StoreSchemaMapping.msl (Embedded, Public)

// FirebirdSql.Schema.FbMetaData.xml = System.IO.MemoryStream

// FirebirdSql.Entity.ProviderManifest.xml = System.IO.MemoryStream

Blocking bug after 3 years ;-)

@firebird-automations
Copy link
Author

Commented by: @cincuranet

I'm closing this ticket as CF builds are no longer produced.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Won't Fix [ 2 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants