Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Tuesday, March 27, 2012

Data Source View and Report Model

Guys,

I created a Data Source View that uses two different Data Source connections to two different databases. I was able to drop in the tables in the data source view designer from the two databases, but when I try to create the Report Model based on that data source view, it's complaining that it can't find table in the non-primary data source from the data source view.

Here is the error I'm getting:

An error occurred while executing a command.

Message: Invalid object name 'dbo.[tablename]'

Command:

SELECT COUNT(*) FROM [dbo].[tablename] t

Why can't it find the database to connect to since the data source view is already creating using two different databases. No problem in the data source view, but when it actually becomes a model, it complains. How come it can't find one of the tables in a different database?

Please help and any help is appreciated.

Enkh.

semantic queries currently do not support multiple data sources. you can create named query that would reference table from another database using db.schema.tablename notation.

Thursday, March 22, 2012

data replicate incorret field (Urgent)

I'm using SQL 2000 with SP3 and made an replication link to another server.
A few weeks ago, I drop the replication and add a new column in both
publisher and subscriber server and made a new replication. Recently, I
found that a new column did not replicate a data. I check with
sp_browsereplcmds found that it update a another field. Why? How to fix it?
please help
RC
Firstly, it's worth mentioning that sp_repladdcolumn will do what you
require 'in-place' ie there's no need to set up the publication from
scratch. You may have had other reasons for doing this anyway. So, to find
out a little more, are the schemas on the publisher and subscriber now
identical? If not, do you have any filters in place? Did you create the
replication stored procedures yourself?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||the schema is the same on publisher and subscriber and no columns filtering
RC
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> glsD:%23M9TOCQFGHA.1312@.TK2MSFTNGP09.phx .gbl...
> Firstly, it's worth mentioning that sp_repladdcolumn will do what you
> require 'in-place' ie there's no need to set up the publication from
> scratch. You may have had other reasons for doing this anyway. So, to find
> out a little more, are the schemas on the publisher and subscriber now
> identical? If not, do you have any filters in place? Did you create the
> replication stored procedures yourself?
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||OK. Perhaps you have changed the column order on the table at the
subscriber, or the subscriber and publisher schema are out of sync in some
way. If you run sp_scriptpublicationcustomprocs @.publication = 'yourpubname'
do you get the same stored proc syntax as the one currently existing on the
subscriber? Is this the same column order in the Insert Statement as that
existing on the subscriber?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Tuesday, March 20, 2012

data provider cannot be found

Hi there,

I am trying to use the new ListView control in VS2008 in an ASP.Net app. My problem starts already with the datasource. I drag and drop a SqlDataSource and select

Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5)

I can connect to the database and test the query in the wizard (I do not need to use a password??)

This is the webconfig entry

<add name="ConnectionString" connectionString="Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf" providerName="Microsoft.SqlServerCe.Client.3.5"/>

I add the following line in the page load event

AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);

However I get the error message that the data provider cannot be found and it might not be installed. I added the reference and also gave the folder above ASP.NET full access rights.

Anyone else encountered this problem. It is quiet strange? Thanks a lot for your help.

Cheers,

Chris

Hi,

From your description, it seems that you are wondering why the database creating wizard doesn't ask for your userid and password, and another question is why does you application can't find the data provider, right?

For you first question, I think what the database you created is in Windows Authentication mode, so when you create a database connection wizard, the wizard connects to your database by your windows account. If you want to change the windows authentication mode, you may open your sqlserver enterprise manager, and change the authentication mode to SQL mixed authentication mode in the security part.

Second, from the provider in your connection string, you are using .NET Framework Data Provider for Microsoft SQL Server Compact 3.5. But the application you created is a ASP.NET application, so are you sure you want to connect a SQLServer compact edition. Generally, you should create a SQLServer database and use "System.Data.SqlClient" as the providername in your connection string.

Thanks.

|||

Hi Michael,

of course you are right. I realised yesterday that I just use the wrong data provider. Stupid me. All works fine now.

Thanks again,

Cheers,

Chris

sql

Sunday, March 11, 2012

Data not display in dropdown lists

I have 2 drop down lists in my report. When you select an item from
the 1st list, the 2nd list gets populated accordingly. For some
records in list 1 you get only a single record in the 2nd drop down.
In these cases, you don't see the item in the drop downlist, but I
tried checking in the source of the page n could see the particular
item. Any idea why this is happening?On Mar 1, 10:01 am, cham...@.gmail.com wrote:
> I have 2 drop down lists in my report. When you select an item from
> the 1st list, the 2nd list gets populated accordingly. For some
> records in list 1 you get only a single record in the 2nd drop down.
> In these cases, you don't see the item in the drop downlist, but I
> tried checking in the source of the page n could see the particular
> item. Any idea why this is happening?
It sounds kind of like you are returning a null value in the 2nd drop-
down list (and possibly the correct one after that). Have you checked
the dataset to determine what the possibilities are for the second
drop-down list given the first one's values?
Enrique Martinez
Sr. SQL Server Developer