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

Problem Resolving database type when passing in SqlConnection. #139

Closed
johanlbotha opened this issue Oct 26, 2012 · 1 comment
Closed

Problem Resolving database type when passing in SqlConnection. #139

johanlbotha opened this issue Oct 26, 2012 · 1 comment

Comments

@johanlbotha
Copy link

I am getting an object null error when passing in the Connection object. The line causing the problem appears to be:
// Resolve the DB Type
string DBTypeName = (_factory == null ? _sharedConnection.GetType() : _factory.GetType()).Name;
I changed it to:
// Resolve the DB Type
string DBTypeName = (_factory == null ? _sharedConnection.GetType() : _factory.GetType()).FullName;

The reason for that was this line:
if (TypeName.StartsWith("System.Data.SqlClient."))
But using name gives just SqlConnection.

@pleb
Copy link
Member

pleb commented Dec 4, 2015

Dup of #136

@pleb pleb closed this as completed Dec 4, 2015
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