Sunday, February 19, 2012

Connection string and external web host.

Hey guys, I'm havnig a bit of trouble setting up my sql reporting tools. My webhost's technical support either does not know what they're doing or might just not care. They 've been unelpful so I'm resorting to asking a stupid noob question again. I hope you guys can help me out.

On my home pc, all i woul have to input is

Data Source=mycomputername\sqlexpress;AttachDbFilename=c:\document and settings\administrator\mydocuments\test8_data1.mdf;Initial Catalog=test

and it would work.

However, when I upload thist stuff to my host and in their admin pages I entered various strings and none of them work.
For the data source I've tried :

Data Source = ./sqlexpress
data source = server ip
data source = server ip/sqlexpress
data source = sqlexpress

as for attachdbfilename I've tried
|datadirectory|\test8_data1.mdf
full path to test8_data1.mdf
and just test8_data1.mdf

In addition to that, in order for this to work, do I need to both input the connection string on the server as well as the .RDL file I upload? I assume both settngs need to be identical for it to work.

Unfortruantely after trying all this,

"An error has occurred during report processing.
Cannot create a connection to data source 'test'.
For more information about this error navigate to the report server on the local server machine, or enable remote errors "

1) Chane hosting company :) Try CrystalTech, Webhost4life - both have great support and will always help you solve problems like that

2) You will find all info about connection strings here

http://www.connectionstrings.com/

3) What you have is database file (from sql express) - most hosting companies DO NOT support it, but they should offer some tools to copy it/attach it to full SQL server. Or you can create backup and ask them to restore it for you - after that go to website i gave you and it will work :)

|||

the irony, I use webhost4life.

I sent over 5 helpdesk tickets about what would go into datasource, and I got answers such as, you can input that in the report manager. which wasn't the question.

On my computer I have the computer name so I can easily just do servername\sqlexpress, but i've tried everythign and it won't work on their server.

As for item 3, I did use sqlexpress for my .mdf file , created a backup and restored it into webhost4life's sql server. So that isn't an issue.

|||

With Webhost4life

- login to your acc.

- go to "database" top menu

- click on "MSSQL Admin" left menu

- and you should see all your SQL databases there wit the IP and login ingo you should use to connect to it

Your connections string will look like that

connectionString="Data Source='sql332.mysite4now.com';User ID='USER_HERE';Password=PASSWORD_HERE;database='DATABASENAME_HERE'"

change sql332.mysite4now.com to your sql server

and that is it

|||

hey tom thanks very much. Still having some issues, if you don't mind I'd like to request some more advice.

1) My current status is, went into sqlreport01.mysite4now.com/reports... and created a data source and used that as a shared data source and also inputed the info for my .rdl file
i've also, tried just deleting the shared data source and used a custom datasource and my .rdl report file.

currently its listed as.

"Data Sources="Data Source='sql380.mysite4now.com';User ID=' my username ';Password=' my password ';database='bkt_data.mdf'""

on the site,

and

<DataSource Name="test">
<ConnectionProperties>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>Data Sources="Data Source='sql380.mysite4now.com';User ID=' my username ';Password=' my password ';database='bkt_data.mdf'";</ConnectString> <DataProvider>SQL</DataProvider>
</ConnectionProperties>
<rd:DataSourceID>df397291-cd99-460b-9468-1324b2143105</rd:DataSourceID>
</DataSource>
</DataSources>


in the .rdl file

I've tried both ways and they both don't seem to work.

bkt_data is a sql2005 database that i created from their site.

So now after trying your advice, I realized that the message

"

  • An error has occurred during report processing.
  • Cannot create a connection to data source 'test'.
  • For more information about this error navigate to the report server on the local server machine, or enable remote errors|||

    can you access your database from EM ?

    |||

    I actually don't have EM i beleive. I'm assuming that comes with sql server. I only have express edition. However like i stated, the database itself was loaded into a sqlserver database from the control panel. Do i need eM?

    |||scratchthat, microsoft has an web version of smoethign similair to em and I'm using it. It works, I can connect to the database. so then I wonder what the problem is.|||ok and what is the database name there ?|||

    now i'm not even sure what you are using database file in app_data folder ? or you uploaded db from backup ?

    if file in app_data folder read this :

    http://www.webhost4life.com/kb/question.php?qstId=153

    |||

    my db name is bkt and its the same from the tool as well as the database tab in the control panel.

    also, I restored db from backup.

    |||

    it is late :)

    anyway if your database name is "bkt" why are you using "'bkt_data.mdf'" as a database name in connection ???

    "Data Sources="Data Source='sql380.mysite4now.com';User ID=' my username ';Password=' my password ';database='bkt_data.mdf'""

    |||my apologies. My database is named bkt, but the file name that webhost4life gave it is bkt_data.mdf
    I'm gonna try it again later today and see if it works. thanks for all your help. I really appreciate it.|||

    I misread what you had wrote up there so here is the revised script in my rdl file. I noticed it automatically makes a custom data source on the report manager side.

    <ConnectString>connectionString="Data Source='sql380.mysite4now.com';User ID='user';Password='password';database='bkt'";</ConnectString>

    still does not seem to work. Is there a simple way to test if the report manager can even access sql380.mysite4now.com?

    |||Hey tom, got it to work. Thanks for all your help. I usually print out my reports with .16 margins all around, but there no setting for that here. Is that something I can input into the .rdl files?
  • No comments:

    Post a Comment