Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Wednesday, March 28, 2012

problem with browser data from cube

All,

I'm having a problem with browser data from the cube in BI studio. the error MSG is " a connection cannot be made, make sure the server is running"

in fact , the server is running, and I can see anything within that cube with Management studio, where I went wrong? and what should I do to fix it?

Thanks.

Please do reprocess and reconnect on the browser tab.sql

Problem with BOF and EOF

I have a adodb connection to a access database and the connection is opened. I want to be able to navigate the records using buttons (first, previous, next and last) and output the data into textboxes. I want to disable the buttons first and previous if BOF is true and next and last if EOF is true.

My problem is that i'm doing the check algorithm when the click event is pressed (set all buttons false, if EOF is false, enabled last and next buttons, if BOF is false, enable first and previous buttons. However, when i test it and click next until it reaches the last record, i have to click it one more time for it to be disabled:

rs a recordset object

Private Function checkRecord() As Boolean

checkRecord = True
tsbLast.Enabled = False
tsbNext.Enabled = False
tsbFirst.Enabled = False
tsbPrevious.Enabled = False
If Not rs.EOF Then
rs.MoveNext()
If Not rs.EOF Then
tsbLast.Enabled = True
tsbNext.Enabled = True
Else
checkRecord = False
End If
rs.MovePrevious()
End If

If Not rs.BOF Then
rs.MovePrevious()
If rs.BOF Then
checkRecord = False
Else
tsbFirst.Enabled = True
tsbPrevious.Enabled = True
End If
rs.MoveNext()
End If

End Function

Is there a cursor location property that returns a integer identifying location of the record? I really hate how BOF and EOF returns true only if the current cursor location is after the last or before the first (its like starting an index at -1, and not 0, and i can't add or subtract from the EOF and BOF indices) or a much more efficient way of doing this?

You might want to look into using the recordset object's AbsolutePosition property. Combined with the Recordcount property, you should be able to determine your current location at all times. Note this depends on the underlying OLEDB provider you are using. For more information please visit http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdproabpos.asp

Regards, Uwa.

|||

Hello,

What I've done in the past with ado to get around this is to create a member variable, called say "_CurrentPosition" that I set to 0 when I first populate the RS, then increment/decrement when MoveN is called. This way, you can just check the _CurrentPosition variable to achieve what you want:

if (CurrentPosition == rs.RecordCount)

{

// disable move next button etc

}

else if (CurrentPosition = 0) //or 1 if you didn't create it as zero-based!

{

// disable move first button etc

}

I know it's not exactly what you're after, but there is no native property/method that ado exposes. As you may have discovered, the EndOfRecordset event fires only after you attempt to move beyong EOF...

Cheers,

Rob

|||

Hello,

Just seconding what Uwa said: be careful using the AbsolutePosition property as this is provider dependent and I have never been able to utilise it with any degree of confidence.

Cheers,

Rob

|||You can try using ADO Data Control. You can find an example at - http://www.devarticles.com/c/a/Visual-Basic/Implementing-An-ADO-Data-Control-With-VB6/|||Thanks for all the replies, it seems that using OleDB as the provider instead of ADODB would make the most sense. It is a bit more coding, but not enough to persuade me to mess with ADO

Problem with Best Practices Analyzer and set nocount on.

Hi.
There is a bug with BPA.
When you configure a server with sp_configure 'user options',512 or EM
(default connection options) seting to NOCOUNT ON, BPA fails when reading
the catalog.
Esio
Thanks Esio for reporting this issue.
We shall work on fixing this issue in future release of BPA
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Esio Nunes" <esio_nunes@.hotmail.com> wrote in message
news:%239d5MqL%23EHA.3988@.TK2MSFTNGP11.phx.gbl...
> Hi.
> There is a bug with BPA.
> When you configure a server with sp_configure 'user options',512 or EM
> (default connection options) seting to NOCOUNT ON, BPA fails when reading
> the catalog.
> Esio
>

Monday, March 26, 2012

Problem with ASP and SQL ODBC connection

Hi everyone, I need your expert advice. I have a w2k AD service with mssql on
it. and I setup another w2k server with IIS on it as webserver. my website
works on NT servers, but when I moved the website to the w2k server, it
doesn't work. It saids:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'.
/media/IIS_Gen_3.0_Recordset.js, line 366
My problem not stops here, as my website created by a program, therefore, I
don't know how to change the open connection statement. so therefore, I can
only find a way to overcome this user account login problem.
=?Utf-8?B?UGF0cmljayBUYW5n?= <PatrickTang@.discussions.microsoft.com>
wrote in news:E04EF7D8-542E-455B-A5C3-D134A92653F2@.microsoft.com:
I'm up against a similar problem, but having checked out KB 247931 I'm
still baffled.
AFAICS, the browser takes the authentication happily, but sql 2k gives me
either a '\' as the failed login or the same as below.
Yet the users are all members of a domain group that has access set
up....

> Hi everyone, I need your expert advice. I have a w2k AD service with
> mssql on it. and I setup another w2k server with IIS on it as
> webserver. my website works on NT servers, but when I moved the
> website to the w2k server, it doesn't work. It saids:
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'NT AUTHORITY\ANONYMOUS LOGON'.
> /media/IIS_Gen_3.0_Recordset.js, line 366
> My problem not stops here, as my website created by a program,
> therefore, I don't know how to change the open connection statement.
> so therefore, I can only find a way to overcome this user account
> login problem.
>
sql

Problem with ASP & SQL ODBC connection

Hi everyone, I need your expert advice. I have a w2k AD service with mssql on
it. and I setup another w2k server with IIS on it as webserver. my website
works on NT servers, but when I moved the website to the w2k server, it
doesn't work. It saids:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'.
/media/IIS_Gen_3.0_Recordset.js, line 366
My problem not stops here, as my website created by a program, therefore, I
don't know how to change the open connection statement. so therefore, I can
only find a way to overcome this user account login problem.
Hi
Since it is and IIS site, the local NT IIS account, IUSR_<machinename>, will
be the user coming through on the connection. You need to give it rights in
you DB.
The best way to do this is to create a domain account for IIS, give it
rights in your DB and then re-configure IIS to use that for anonymous access.
There are security implications, so make sure that you give the user the
least rights at domain and DB level.
Regards
Mike
"Patrick Tang" wrote:

> Hi everyone, I need your expert advice. I have a w2k AD service with mssql on
> it. and I setup another w2k server with IIS on it as webserver. my website
> works on NT servers, but when I moved the website to the w2k server, it
> doesn't work. It saids:
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
> AUTHORITY\ANONYMOUS LOGON'.
> /media/IIS_Gen_3.0_Recordset.js, line 366
> My problem not stops here, as my website created by a program, therefore, I
> don't know how to change the open connection statement. so therefore, I can
> only find a way to overcome this user account login problem.
>

problem with analysis server connection string

i have just installed a new version of analysis services 2000 on a test machine. when i try to connect to the local host i get the error "Datasource name is too long". I have set the datasource string to

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\serverName\MsOLAPRepository$\msmdrep.mdb

This is the same string as i have on other analysis servers, bar the server name, but it still does not work. any ideas?

The olap service is running correctly, just in case its a detail you need to know.

I assume you use Analysis Manager or DSO program to connect, and you change the "Repository Connection String" property from Analysis Manager. Can you check whether you can open msmdrep.mdb repository file from Access ? Or try to migrate repository to SQL Server - will you get the same error ?

Wednesday, March 21, 2012

problem with 2005 xml datasource that is xml render of a 2000 report

Hi,
I'm trying to setup an xml datasource in ssrs 2005. The xml datasource is
an xml render from a ssrs 2000 report.
The connection string is a url which works fine when I put it into a
standalone browser (prompts me to save the xml output).
However when I try to then do a basic Query String for a dataset, I get an
error back from ssrs 2000
"The value provided for the report parameter 'EndDate' is not valid for its
type. (rsReportParameterTypeMismatch) "
My url is url encoded, and has the name value pair
"rs:ParameterLanguage=en-GB" defined
Any ideas on troubleshooting this?
Thanks
MartinTurns out I wasn't affecting the url when I thought I was.
"Martin" <x@.y.z> wrote in message
news:%23pgeok9OHHA.3268@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I'm trying to setup an xml datasource in ssrs 2005. The xml datasource is
> an xml render from a ssrs 2000 report.
> The connection string is a url which works fine when I put it into a
> standalone browser (prompts me to save the xml output).
> However when I try to then do a basic Query String for a dataset, I get an
> error back from ssrs 2000
> "The value provided for the report parameter 'EndDate' is not valid for
> its type. (rsReportParameterTypeMismatch) "
> My url is url encoded, and has the name value pair
> "rs:ParameterLanguage=en-GB" defined
> Any ideas on troubleshooting this?
> Thanks
> Martin
>

Tuesday, March 20, 2012

Problem with " , " and " "

I'm programming under VB, and I have a connection to a MSSQL Server 2000 database. How can I make a query work when a string contains "," and "'"? All I could think about is changing all querys to stored procedures. Is there any special character I could use to tell the server to include the coma as part of the string?whether you use stored procedures or straight sql instructions from a VB client, you still need to pass parameters and if you need to pass a string parameter that contains a single quote (') insert another quote just next to it and it should be fine. As for commas, a string parameter containing a comma and delimited by two single quotes should work fine.

try in QA:

create table #temp(field1 varchar(500))
insert into #temp(field1) values ('test1''')
insert into #temp(field1) values ('test2 ,')
select * from #temp
drop table #temp|||...but use stored procedures anyway...|||is it nececessary to user storedprocedures for data inserting?
cant we use

sSql = "insert into tablename values (" & var1 & "," & var2 & ")"
dbConn.Execute sSql

cud u pl tell, if thers ne advantage in using sp for data insertion|||Using an sp for data insertion can have the advantage of shielding the db layout from applications, so applications may not have to be modified, recompiled and distributed if changes are made. Some database administrators like to know all the update/insert statements that could be executed so they can tune the database. It might also help seperating business logic from your applications.

I'm sure there are more, but these are the ones I can come up with.

One thing I haven't mentioned is that the company you work for may have chosen for one type of approach (having all in vb or all in sp), which sort of overrules advantage/disadvantage.|||apart from separating the business logic from applications, will there be an improved performance for large insert/update statements while using an sp

i.e, for an insert statement like

sSql = "insert into table1(field1,field2,....fieldn) values ("
& val1 & "," & val2 & "," .... & "," & valn & ")"
dbConn.Execute sSql

pl post ur comments|||I'm programming under VB, and I have a connection to a MSSQL Server 2000 database. How can I make a query work when a string contains "," and "'"? All I could think about is changing all querys to stored procedures. Is there any special character I could use to tell the server to include the coma as part of the string?

you can use this code to sole ur Problem

Pvar_DataBase.Execute "insert into " & TablName _
& "(Filed01,Filed02)" _
& " Values('" & value01 & "','" & Single_Qute(Value02) & "')"

Public Static Function Single_Qute(String_Value As String) As String
Single_Qute= Replace(String_Value, "'", "''")
Single_Qute= Replace(String_Value, ",", "''")
End Function

If u have any problem

send me to
tgamil@.egysoft-it.com

Best Regards

Tarek Gamil

Monday, March 12, 2012

problem when selecting dynamic connection setting

Hello All,

I have a SSIS package, desgined in such a way that, there is a table called connection which hold the connection name i.e similar to my DSN connection name & a ID for each DSN there is a unique ID. Now i want if there is a 10 record in the table & i have only 5 DSN connection then i'll work for 5 & for other 5 it 'll skip the process. my task is running success fully for 1 connection. i have used foeach loop container & 3 varibable for that 2 for holding the table value & 1 for refereing the recordset

thanks

So are you saying that the table holds 10 records but only 5 of them are valid for the particular package that you are currently executing?

Then you need to filter the list of connections that you want to "use". Can you not hardcode that filter per package?

Sorry, I don't really understand the requirement.

-Jamie

|||

take a example

i have a table table1(id,DsnConnectionName,.) table has 20 records. that means there is a information for 20 DSN connection. But my machine has only 5 DSN Connection. That is in that table. i have first i'm collecting these record in a record set then connect that data flow task with foreach loop. i have 2 variable 1 hold the ID & another DSNConnectionName.

in that foreach loop container i have placed a script task which is setting the connection according to the DSN name assign in that variable. but when the dsn connection with that name is not available in my system then i gives error. for that i use try catch but due to this it;'s running & inserting data each time.

|||

Why can you not just create all the required DSNs?

Why would you try andrun something against a DSN that does not exist?

If you're not going to create the DSNs then, like I said before, you need some way of filtering the list of connections that you iterate over.

-Jamie

|||

Thanks for your keen interest in my problem.

I got the solution,

solution is very simple i used try catch mathod & set dts.taskresult = dts.results.failure for error condition

Friday, March 9, 2012

problem when connectiong to database

Hi,
I try to make a connection with the database "test" contained in sql server
express 2005.
This is the connection string in the aspx file:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Provider=SQLOLEDB;Data
Source=laptop\sqlexpress;Integrated Security=SSPI;Initial Catalog=test"
ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM
[mytable]"></asp:SqlDataSource>
Sql server express is installed with Windows authentification.
When runing the aspx page, i get: "Cannot open database "test" requested by
the login. The login failed"
I suppose the account ASPNET (machine account used for asp.net pages) has
not the right permissions.
So i started my "Sql server Management Studio Express", selected the
database "test" and went to the property "permissions".
There, i tried to add a user by clicking on button ADD: in the following
window, i can introduce the new user, but it refused all
of them (ASPNET, ASP.NET Machine account ...), even my administrator account
"Bart" is not recognized.
So i have two questions:
1)is the error due not enough permissions (of account ASPNET)?
2) if yes, how to give it the right permissions (write)?
Thanks for help
BartBart,
Did you first add the login? I have not used the Express tools, but a
database User is based on a Server Login (either Windows or SQL Server).
Go to the server's Security settings and add a login. Or use CREATE LOGIN.
RLF
"Bart" <baa@.qsd.dfv> wrote in message
news:OA3UE9JbHHA.1296@.TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I try to make a connection with the database "test" contained in sql
> server express 2005.
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="Provider=SQLOLEDB;Data
> Source=laptop\sqlexpress;Integrated Security=SSPI;Initial Catalog=test"
> ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM
> [mytable]"></asp:SqlDataSource>
> Sql server express is installed with Windows authentification.
> When runing the aspx page, i get: "Cannot open database "test" requested
> by the login. The login failed"
> I suppose the account ASPNET (machine account used for asp.net pages) has
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the following
> window, i can introduce the new user, but it refused all
> of them (ASPNET, ASP.NET Machine account ...), even my administrator
> account "Bart" is not recognized.
>
> So i have two questions:
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
> Thanks for help
> Bart
>
>|||First, check out the (free) article on connecting on my blog. It discusses a
litany of issues on connecting.
Next, let's take this a step at a time.
a.. If you are building a .NET application as I expect you are, you should b
e using the SqlClient .NET provider--not OLE DB.
b.. If you are specifying SSPI integrated (trusted) security, you need to pr
operly configure your database to accept connections on the ASP accounts as
you seem to be attempting to do. These vary by name based on the version of
IIS you have installed. These are either ASPNET or IUSR_<machinename>.
c.. Consider that an ASP application can connect either through these accoun
ts (Integrated Security=SSPI) or through a named SQL Server login account. I
n the latter case you MUST reconfigure SQL Server Express to accept this typ
e of security. If the former, there is no need to specify a UID or PWD--they
are ignored. Either account must have been granted rights to the database y
ou're trying to open. This is done through the SSMS tools as you have attemp
ted. In SSMSe open a connection to the SQLEXPRESS instance, drill into Login
s and right click on the appropriate account (like ASPNET). Choose propertie
s. Choose User Mapping and check each database this account has rights to ac
cess and the role membership for each.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Bart" <baa@.qsd.dfv> wrote in message news:OA3UE9JbHHA.1296@.TK2MSFTNGP02.phx.gbl...agreen">
> Hi,
>
>
> I try to make a connection with the database "test" contained in sql serve
r
> express 2005.
>
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="Provider=SQLOLEDB;Data
>
> Source=laptop\sqlexpress;Integrated Security=SSPI;Initial Catalog=test"
> ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM
> [mytable]"></asp:SqlDataSource>
>
> Sql server express is installed with Windows authentification.
>
> When runing the aspx page, i get: "Cannot open database "test" requested b
y
> the login. The login failed"
>
> I suppose the account ASPNET (machine account used for asp.net pages) has
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the following
> window, i can introduce the new user, but it refused all
>
> of them (ASPNET, ASP.NET Machine account ...), even my administrator accou
nt
> "Bart" is not recognized.
>
>
> So i have two questions:
>
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
>
> Thanks for help
> Bart
>
>
>
>|||Thanks both for replying.
So you both agree that the problem is that account ASPNET must get R/W permi
sions.
Russel:
--
in the Sql server Management Studio Express, i go to Permissions of Server\S
Qlexpress level and there, i see a list like:
AgentSigningCertificate
SQLAuthentificationCertificate
...
Built-in user
Buit-in administrator
Servername\SQLServer2005MSSqluser$server
name$sqlexpress
NT AUTHORITY \ System
public
I can't see account "ASPNET" as i can do when seeing the list in the Active
Directory.
I think it is hidden in NT AUTHORITY \ System.
So i add it and give it "Connect SQL" grant.
Then i select database "test" but there i see only two types of users:
guest
public
and when i grant "connect sql" to Public, i get an error 4627.
William:
--
I work with Visual Web Developer: when making a sqldatasource, i can choose
between:
microsoft SQL Server Database File (SqlClient) but then i 'm requested to ch
oose an MDF file
or
microsoft SQL Server but i must take Provider: for Ole db. If i choose "micr
osoft SQL Server" and Provider for sql server, it switch back to microsoft S
QL Server Database File (SqlClient).
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht news
:OWjZNxKbHHA.704@.TK2MSFTNGP04.phx.gbl...
First, check out the (free) article on connecting on my blog. It discusses a
litany of issues on connecting.
Next, let's take this a step at a time.
a.. If you are building a .NET application as I expect you are, you should b
e using the SqlClient .NET provider--not OLE DB.
b.. If you are specifying SSPI integrated (trusted) security, you need to pr
operly configure your database to accept connections on the ASP accounts as
you seem to be attempting to do. These vary by name based on the version of
IIS you have installed. These are either ASPNET or IUSR_<machinename>.
c.. Consider that an ASP application can connect either through these accoun
ts (Integrated Security=SSPI) or through a named SQL Server login account. I
n the latter case you MUST reconfigure SQL Server Express to accept this typ
e of security. If the former, there is no need to specify a UID or PWD--they
are ignored. Either account must have been granted rights to the database y
ou're trying to open. This is done through the SSMS tools as you have attemp
ted. In SSMSe open a connection to the SQLEXPRESS instance, drill into Login
s and right click on the appropriate account (like ASPNET). Choose propertie
s. Choose User Mapping and check each database this account has rights to ac
cess and the role membership for each.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Bart" <baa@.qsd.dfv> wrote in message news:OA3UE9JbHHA.1296@.TK2MSFTNGP02.phx.gbl...agreen">
> Hi,
>
>
> I try to make a connection with the database "test" contained in sql serve
r
> express 2005.
>
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="Provider=SQLOLEDB;Data
>
> Source=laptop\sqlexpress;Integrated Security=SSPI;Initial Catalog=test"
> ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM
> [mytable]"></asp:SqlDataSource>
>
> Sql server express is installed with Windows authentification.
>
> When runing the aspx page, i get: "Cannot open database "test" requested b
y
> the login. The login failed"
>
> I suppose the account ASPNET (machine account used for asp.net pages) has
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the following
> window, i can introduce the new user, but it refused all
>
> of them (ASPNET, ASP.NET Machine account ...), even my administrator accou
nt
> "Bart" is not recognized.
>
>
> So i have two questions:
>
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
>
> Thanks for help
> Bart
>
>
>
>|||Hi, i found it finally... thanks
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht news
:OWjZNxKbHHA.704@.TK2MSFTNGP04.phx.gbl...
First, check out the (free) article on connecting on my blog. It discusses a
litany of issues on connecting.
Next, let's take this a step at a time.
a.. If you are building a .NET application as I expect you are, you should b
e using the SqlClient .NET provider--not OLE DB.
b.. If you are specifying SSPI integrated (trusted) security, you need to pr
operly configure your database to accept connections on the ASP accounts as
you seem to be attempting to do. These vary by name based on the version of
IIS you have installed. These are either ASPNET or IUSR_<machinename>.
c.. Consider that an ASP application can connect either through these accoun
ts (Integrated Security=SSPI) or through a named SQL Server login account. I
n the latter case you MUST reconfigure SQL Server Express to accept this typ
e of security. If the former, there is no need to specify a UID or PWD--they
are ignored. Either account must have been granted rights to the database y
ou're trying to open. This is done through the SSMS tools as you have attemp
ted. In SSMSe open a connection to the SQLEXPRESS instance, drill into Login
s and right click on the appropriate account (like ASPNET). Choose propertie
s. Choose User Mapping and check each database this account has rights to ac
cess and the role membership for each.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Bart" <baa@.qsd.dfv> wrote in message news:OA3UE9JbHHA.1296@.TK2MSFTNGP02.phx.gbl...agreen">
> Hi,
>
>
> I try to make a connection with the database "test" contained in sql serve
r
> express 2005.
>
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="Provider=SQLOLEDB;Data
>
> Source=laptop\sqlexpress;Integrated Security=SSPI;Initial Catalog=test"
> ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM
> [mytable]"></asp:SqlDataSource>
>
> Sql server express is installed with Windows authentification.
>
> When runing the aspx page, i get: "Cannot open database "test" requested b
y
> the login. The login failed"
>
> I suppose the account ASPNET (machine account used for asp.net pages) has
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the following
> window, i can introduce the new user, but it refused all
>
> of them (ASPNET, ASP.NET Machine account ...), even my administrator accou
nt
> "Bart" is not recognized.
>
>
> So i have two questions:
>
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
>
> Thanks for help
> Bart
>
>
>
>

Problem when Connection is not available

Hello!

I have problem when opening a package or running it through SQL Server Agent and the Server in the Connection is not available. (I have tried with (M) SSIS > Work Offline, it helps opening it, but not running it).

The package has a Foreach Loop Container that loop through several Companies. Each Company have different Connection.

It exist one ODBC and one OLEDB connection. They have the Expression “ConnectionString” set to an variable (@.[User::varODBCConnectionString]/ @.[User::varOLEDBConnectionString]).

The Foreach Loop Container property ForceExectionResult is set to Completion. This results in that if one company is not available when trying to access it, the loop will continue with the next Company.

But the variables have a value from the beginning. If the server in the variables is not available, it is not possible to open the package or execute it through SQL Server Agent.

I tried to set the Property DelayValidation to True on the Connections, but this did not help.

Dose anyone have any ide how get around this problem?

Best regards,

Tina

Hi Tina,

You need to set DelayValidation=TRUE on the tasks that use those connection managers, not on the connection managers themselves.

Regards

Jamie

|||

Hello Jamie!

Thank you very much, it works now, bouth SQL Server Agent and in SSIS. (I also need to set Delay Validation = TRUE for att least the ODBC connection.).

Best regards,

Tina

Problem when connect to SQL Server 2005 (SQL Native Client + Named instance)

Hi,
I have an application which previous connect to SQL Server 2000.
Now, I installed SQL Server 2005, and try to conncet to it.
The previous connection string is:
sString.Format("DSN=%s;uid=%s;pwd=%s", sDb, sUser, sPassword);
In order to support SQL Native Client driver in SQL Server 2005, I
changed the connection string to:
sString.Format("Provider=SQLNCLI;
DataTypeCompatibility=80;DSN=%s;uid=%s;pwd=%s", sDb, sUser,
sPassword);
I have a default instance and a named instance in my database. So i
created two DSN:
(1) Use SQL Native Client as the driver and connect to the default
instance.
The application could work well under this configuration.
(2) Use SQL Native Client as the driver and connect to the named
instance.
The application could not work successfully under this
configuration.
It could not connect to the database.
I have started the SQL Server Browser service.
Why I could not connect to the database when i use SQL Native Client +
Named instance
Who can help me?
Thanks in advance.
Did you enable the Allow Remote Connections option? Have you run the
Surface Area Configurator and the SQL Server Configuration Manager?
Andrew J. Kelly SQL MVP
<yangrudy@.126.com> wrote in message
news:1140155887.725187.43270@.g44g2000cwa.googlegro ups.com...
> Hi,
> I have an application which previous connect to SQL Server 2000.
> Now, I installed SQL Server 2005, and try to conncet to it.
> The previous connection string is:
> sString.Format("DSN=%s;uid=%s;pwd=%s", sDb, sUser, sPassword);
> In order to support SQL Native Client driver in SQL Server 2005, I
> changed the connection string to:
> sString.Format("Provider=SQLNCLI;
> DataTypeCompatibility=80;DSN=%s;uid=%s;pwd=%s", sDb, sUser,
> sPassword);
> I have a default instance and a named instance in my database. So i
> created two DSN:
> (1) Use SQL Native Client as the driver and connect to the default
> instance.
> The application could work well under this configuration.
> (2) Use SQL Native Client as the driver and connect to the named
> instance.
> The application could not work successfully under this
> configuration.
> It could not connect to the database.
> I have started the SQL Server Browser service.
> Why I could not connect to the database when i use SQL Native Client +
> Named instance
> Who can help me?
> Thanks in advance.
>

Problem when connect to SQL Server 2005 (SQL Native Client + Named instance)

Hi,
I have an application which previous connect to SQL Server 2000.
Now, I installed SQL Server 2005, and try to conncet to it.
The previous connection string is:
sString.Format("DSN=%s;uid=%s;pwd=%s", sDb, sUser, sPassword);
In order to support SQL Native Client driver in SQL Server 2005, I
changed the connection string to:
sString.Format("Provider=SQLNCLI;
DataTypeCompatibility=80;DSN=%s;uid=%s;p
wd=%s", sDb, sUser,
sPassword);
I have a default instance and a named instance in my database. So i
created two DSN:
(1) Use SQL Native Client as the driver and connect to the default
instance.
The application could work well under this configuration.
(2) Use SQL Native Client as the driver and connect to the named
instance.
The application could not work successfully under this
configuration.
It could not connect to the database.
I have started the SQL Server Browser service.
Why I could not connect to the database when i use SQL Native Client +
Named instance
Who can help me?
Thanks in advance.Did you enable the Allow Remote Connections option? Have you run the
Surface Area Configurator and the SQL Server Configuration Manager?
Andrew J. Kelly SQL MVP
<yangrudy@.126.com> wrote in message
news:1140155887.725187.43270@.g44g2000cwa.googlegroups.com...
> Hi,
> I have an application which previous connect to SQL Server 2000.
> Now, I installed SQL Server 2005, and try to conncet to it.
> The previous connection string is:
> sString.Format("DSN=%s;uid=%s;pwd=%s", sDb, sUser, sPassword);
> In order to support SQL Native Client driver in SQL Server 2005, I
> changed the connection string to:
> sString.Format("Provider=SQLNCLI;
> DataTypeCompatibility=80;DSN=%s;uid=%s;p
wd=%s", sDb, sUser,
> sPassword);
> I have a default instance and a named instance in my database. So i
> created two DSN:
> (1) Use SQL Native Client as the driver and connect to the default
> instance.
> The application could work well under this configuration.
> (2) Use SQL Native Client as the driver and connect to the named
> instance.
> The application could not work successfully under this
> configuration.
> It could not connect to the database.
> I have started the SQL Server Browser service.
> Why I could not connect to the database when i use SQL Native Client +
> Named instance
> Who can help me?
> Thanks in advance.
>

Monday, February 20, 2012

Problem uploading .rdl

The report server cannot process the report. The data source connection information has been deleted

I want to make a copy of a report. I go into report properties on the SSRS, click edit and download the .rdl to my computer.

I then upload the report, using a different name.

I then get the above error.

If I copy the report to the same location as the shared data source, and the above error disappears.

But now the report doesn't work - no parameters in the dropdown lists.

My question is : Why does a copy of a report, uploaded to the SSRS, not work, when the original is sitting right next to it, with the same rdl definitin, in a working state?

Are all the datasets using a single shared data source? Check that no private data sources are being used. After re-uploading the report with a different name, go to the properties page in report manager and in the data sources section make sure that you check all the datasources being used. Repoint it to the shared datasource and retype any connection strings and usernames and passwords for the data sources. I think for security reasons these are ommitted when you export the RDL.|||

Adam,

You are right. I checked the Data Sources, and there were two shared data sources that were marked invalid. However, I notice that the parameters have also been messed up. In the original report, there was no default parameter specified, whereas the new report (copied and uploaded) indicates a default parameter, which happens to be an invalid value. Because the dropdown boxes for the other parameters are linked, these dropdown boxes don't populate. My reasoning says that the uploaded .rdl should be the same as the copy I downloaded. I can see that it has been changed when referencing Data Sources. Why is there this difference in the parameters? Is this "by design"?
Question : Why does the parameter default value change when I upload the .rdl using a different name?

Question: How do I fix the problem?

|||

I notice that the new report (copy) has two problems with the parameters:

1. Parameter is no longer marked "hidden", but is marked "prompt the user"

2. Parameter contains an invalid default value.

I have changed the parameter so that it is now marked "hidden", and so that the default value is the same as the original report (which was empty). The report now works.

Perhaps somebody has an answer to the problem below (repeated from previous post):

Question : Why does the parameter default value change when I upload the .rdl using a different name?