DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DB Connect

 12 Replies
 3 Subscribed to this topic
 28 Subscribed to this forum
Sort:
Page 1 of 212 > >>
Author
Messages
Growing Member
Posts: 29
Growing Member

Hello

I would be very grateful if somebody could please help me. 

I am trying to install DNN 9.7.0 to a live server and the only option I have to connect the database to my site folder is via code.  I have the choice of using a VB.NET or C# code to connect ( see below)

---------------------------------------------------------------------------------------------------------------

VB. NET 

<code>Set ConnHandle = Server.CreateObject("ADODB.Connection")</code>

<code>ConnHandle.Open "driver={SQL Server};</code>

<code>server=db12345678.hosting-data.io; </code>

<code>uid=dbo12345678; pwd=your_password; </code>

<code>database=db12345678";</code>

<code>-------------------------------------------------------------------------------</code>

<code>or C#</code>

<code>SqlConnection makeSQLConn = new SqlConnection("Persist Security Info=False;
server=db12345678.hosting-data.io;
Initial Catalog=db12345678; User ID=dbo12345678;
Password=your_password");</code>

<code>---------------------------------------------------------</code>

<code>I don't know which one I need to use the VB.NET or C# ?</code>

<code>Having decided on which code to use what specific filename do I need to use for DNN setup wizard to recognise and read it?</code>

<code>Where do I need to locate this file?</code>

<code>I would really appreciate some guidance.  Thank you</code>

 

Veteran Member
Posts: 1246
Veteran Member
MVP
MVP
You're an MVP!
What file?

Are you doing this in a module? If so, you should get the connection settings from web.config. There are methods in DNN to do this.

Or are you trying to get DNN itself to connect to the database?
Growing Member
Posts: 29
Growing Member

Thanks for your reply Joe.

No I am not refering to a module, I am trying to install DNN 9.7.0 onto a live server and trying to connect the database to DNN. The hosting company have pointed the domain name/server to my folder.  I put my domain name in the browser and the DNN Installation page came up  showing this message:

No valid default database connection detected. Standard Database setup option is unavailable

I have studied the settin up DNN tutorial as recommended in an earlier post. http://dnndocs.com/conten...-overview/index.html  but I don't have access to any of the files shown. 

I have set up a database with a name, a user name and a password and I am informed that I need to use the code to connect the database to the server.   As mentioned I have an option of VB.NET or C# code connection, but I am unsure which one to use and what to call it if it needs to go into a file.  But now I am wondering if I should put this code into the web.config file in my folder and if so where would it go?

Thank you

 

Veteran Member
Posts: 1246
Veteran Member
MVP
MVP
You're an MVP!
Joyce,

If your hosting company cannot give you the access that you need or do it for you, then you should switch to a hosting company that does. Both Managed.com and DNN4Less will do this quickly, professionally, and without extra charges getting it set up. Both, also, provide access to management tools that let you do this yourself.

nvQuicksite is a tool designed to install DNN on a computer to which you have complete access.

I assume that this is a new installation. Do you have a "connection string" for the database?

This should provide instructions for doing the installation manually, and can be done via FTP: https://dnncommunity.org/...Download-and-Install
Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By Joyce on 02 Sep 2020 03:04 AM

Thanks for your reply Joe.

No I am not refering to a module, I am trying to install DNN 9.7.0 onto a live server and trying to connect the database to DNN. The hosting company have pointed the domain name/server to my folder.  I put my domain name in the browser and the DNN Installation page came up  showing this message:

No valid default database connection detected. Standard Database setup option is unavailable

I have studied the settin up DNN tutorial as recommended in an earlier post. http://dnndocs.com/conten...-overview/index.html  but I don't have access to any of the files shown. 

I have set up a database with a name, a user name and a password and I am informed that I need to use the code to connect the database to the server.   As mentioned I have an option of VB.NET or C# code connection, but I am unsure which one to use and what to call it if it needs to go into a file.  But now I am wondering if I should put this code into the web.config file in my folder and if so where would it go?

Thank you

 

You do have a MSSQL server database connection string?
I have setup DNN like this noumerous times before and if I had issues it was mostly some kind of typo..

 

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
Posted By Joe Craig on 02 Sep 2020 09:45 AM
Joyce,

[...]
nvQuicksite is a tool designed to install DNN on a computer to which you have complete access.

[...]

 

As Timo mentioned some days ago, nvQuickSite is not meant for setting up production sites.

Happy DNNing!
Michael

 

Michael Tobisch
DNN★MVP

DNN Connect
Veteran Member
Posts: 1246
Veteran Member
MVP
MVP
You're an MVP!
I don't completely understand the "not meant for setting up production sites" part. Why not?
Growing Member
Posts: 29
Growing Member

Hi Timo

I have a MSSQL database and I do have the database connection string. The hosting company suggest I use this code (see below), with the instructions to "Replace the sample data with the data of my database" But they don't give any further instructions.

VB.NET
The example shows the use of the connection object in ADO:

Set ConnHandle = Server.CreateObject("ADODB.Connection")
ConnHandle.Open "driver={SQL Server};
server=db12345678.hosting-data.io;
uid=dbo12345678;
pwd=your_password;
database=db12345678";mixed
--------------------------------------------------------------------
C#
In this example, a DSN Less connection is established via the SqlConnection object:

SqlConnection makeSQLConn = new SqlConnection("Persist Security Info=False;
server=my-server-name;
Initial Catalog=my-database-name; User ID=my-userID;
Password=my_password");
--------------------------------------------------------------------------

I guess I need to put the code into my web.config file, which has a section to connect to the database.  Do I need to use the existing DNN connection or do I need to replace it with the C# code?

Thank you
Joyce

Growing Member
Posts: 29
Growing Member
Just to let you know, I have managed to install DNN by editing the Connection String in the web.config file.

Thank you for your help.
Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
Posted By Joe Craig on 02 Sep 2020 11:34 AM
I don't completely understand the "not meant for setting up production sites" part. Why not?

Joe,

maybe Timo can shed some light on it. I won't, as he had posted this in a closed forum.

Happy DNNing!

 

 

Michael Tobisch
DNN★MVP

DNN Connect
Page 1 of 212 > >>

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved