Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Is the DNN PetaPoco DAL limited to accessing SPs in default “dbo” schema?Is the DNN PetaPoco DAL limited to accessing SPs in default “dbo” schema?
Previous
 
Next
New Post
10/23/2015 1:12 PM
 

Please someone tell me this ain't so! :-)

I'm getting this error inside Visual Studio:

An exception of type 'System.Data.SqlClient.SqlException' occurred in PetaPoco.dll but was not handled in user code

Additional information: Database 'dbo' does not exist. Make sure that the name is entered correctly.

When this line is executed:

Success = DotNetNuke.Data.DataProvider.Instance().ExecuteScalar(Of String)("CPP.HCT_Test", "Bob", 0)

BUT this line WORKS as expected:

Success = DotNetNuke.Data.DataProvider.Instance().ExecuteScalar(Of String)("HCT_Test", "Bob", 0)

The only obvious difference... I'm calling a SP that's not in the dbo schema. So it appears that the DNN PetaPoco DAL has a problem using somthing other that the default schema, because the error message "Database 'dbo' does not exist." does not make any sense. There is no database called "dbo" only a schema and it does exist.

 

 

 

 

 
New Post
10/23/2015 2:02 PM
 
if you include a ".", the first part is regarded as SchemaName and the 2nd as object name. DNN precedes it with the schema name (usually dbo) - hence the database sees dbo.cpp.HCT_Test, which means dbo is regarded as database name - but this database does not exist. Please do not use "." in object names, replace it by an underline ("_").

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/23/2015 2:46 PM
 

Thanks Sebastain, and while your explanation makes some sense regarding the error message itself I'm now more confused because it also seems like your saying the DAL DOES and DOES NOT support the use of schema other than dbo and that attempting to call a SP in a schema other than dbo does in fact "break" the DAL.

I'll explain... I'm not useing "." in my object names. "HCT_Test" is the name of the stored proc in the "CPP" Schema. 

So if I can't specify the schema in the procedurename argument using dot notation how do I call the HCT_Test SP that is in the CPP schema?

 

 

 
New Post
10/23/2015 2:48 PM
 
DNN uses the schema specified in Web.config, I am not aware of an option to use a different one, if you use DNN PetaPoco API, sorry.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/23/2015 2:52 PM
 

So your saying the answer to my question: "Is the DNN PetaPoco DAL limited to accessing SPs in default schema?" Is infact yes?

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Is the DNN PetaPoco DAL limited to accessing SPs in default “dbo” schema?Is the DNN PetaPoco DAL limited to accessing SPs in default “dbo” schema?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out