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

FbConnection.GetSchema() throws reference exception [DNET102] #116

Closed
firebird-automations opened this issue Jul 2, 2007 · 10 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Eduardo Gamboa (bestrafender)

The following code worked fine with NETProvider 2.1.0 rev 306. But with NetProvider 2.5.0 rev 306 it throws the exception:

"Object reference not set to an instance of an object."

/**********************************************/
static void Main(string[] args)
{
try
{
FbConnectionStringBuilder fbCsb = new FbConnectionStringBuilder();
fbCsb.UserID = "SYSDBA";
fbCsb.Password = "masterkey";
fbCsb.Dialect = 3;
fbCsb.Database = @"d:\temp\employee.fdb";
FbConnection srcConn = new FbConnection(fbCsb.ConnectionString);
srcConn.Open();

            foreach\(DataRow r in srcConn\.GetSchema\("TABLES"\)\.Rows\)
                Console\.WriteLine\("Table name: \{0\}", r\.ItemArray\[2\]\.ToString\(\)\);

            srcConn\.Close\(\);
            Console\.WriteLine\("Ok\."\);
            Console\.ReadKey\(\);
        \}
        catch \(Exception err\)
        \{
            Console\.WriteLine\(err\.Message\);
            Console\.ReadKey\(\);
        \}

    \}
@firebird-automations
Copy link
Author

Modified by: @cincuranet

assignee: Carlos Guzman Alvarez [ carlosga_fb ] => Jiri Cincura [ cincura_net ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Works without problem with employee.FDB (and with some other DB), you send previously. Tested against latest stable 2.0. The 2.1 is now in beta.

@firebird-automations
Copy link
Author

Commented by: @cincuranet

And with 2.1 success too.

@firebird-automations
Copy link
Author

Commented by: @cincuranet

It was not a bug. Only wrong building process.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Closed [ 6 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Author

Commented by: Eduardo Gamboa (bestrafender)

I just tried the FBNet Provider 2.5.0 Alpha 1 released today at IBPhoenix and I am having the exception "Object reference not set to an instance of an object." I reported here.

@firebird-automations
Copy link
Author

Commented by: @cincuranet

The build from NAnt seems to be broken. Try it with VS's build and it will be OK.

BTW are you using 64-bit system?

@firebird-automations
Copy link
Author

Commented by: Eduardo Gamboa (bestrafender)

Yes, the VS's build works fine.
I just wanted to let you know that the published release is not working.

I am using both 32 and 64-bit (Windows Server 2003 32-bit and Vista Ultimate x64)

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Yes, seems to be some problem with NAnt. If you wanna to talk about this, please, subscribe to the list.

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