Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Tuesday, March 27, 2012

Adding a new report to VS 2005

When I try to add a new Report to a Report Server project I get the
following error and I can't add it to project.
TITLE: Microsoft Visual Studio
--
Exception of type 'System.Runtime.InteropServices.COMException' was thrown.
--
BUTTONS:
OK
--
===================================
Exception of type 'System.Runtime.InteropServices.COMException' was thrown.
(Microsoft Visual Studio)
--
Program Location:
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.OnHierarchyNodeAppending(IHierarchyNode
node, IHierarchyNode parentNode)
at
Microsoft.DataWarehouse.VsIntegration.Hierarchy.Hierarchy.Add(IHierarchyNode
node, IHierarchyNode parentNode)
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.AddExistingFileToProject(IFileProjectNode&
parentNode, String name, String fullPath, VSADDITEMOPERATION
dwAddItemOperation)
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.Extensibility.ProjectItemsExt.AddFromFile(String
FileName)
at
Microsoft.ReportDesigner.Wizards.ReportWizardForm.OnFinish(CancelEventArgs
e)Don't know if this is related. In the RTM, there are issues with the add
report wizzard. If you use the add item, then select report everything seems
to works ok.
"Sorin Sandu" wrote:
> When I try to add a new Report to a Report Server project I get the
> following error and I can't add it to project.
> TITLE: Microsoft Visual Studio
> --
> Exception of type 'System.Runtime.InteropServices.COMException' was thrown.
> --
> BUTTONS:
> OK
> --
> ===================================> Exception of type 'System.Runtime.InteropServices.COMException' was thrown.
> (Microsoft Visual Studio)
> --
> Program Location:
> at
> Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.OnHierarchyNodeAppending(IHierarchyNode
> node, IHierarchyNode parentNode)
> at
> Microsoft.DataWarehouse.VsIntegration.Hierarchy.Hierarchy.Add(IHierarchyNode
> node, IHierarchyNode parentNode)
> at
> Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.AddExistingFileToProject(IFileProjectNode&
> parentNode, String name, String fullPath, VSADDITEMOPERATION
> dwAddItemOperation)
> at
> Microsoft.DataWarehouse.VsIntegration.Shell.Project.Extensibility.ProjectItemsExt.AddFromFile(String
> FileName)
> at
> Microsoft.ReportDesigner.Wizards.ReportWizardForm.OnFinish(CancelEventArgs
> e)
>
>|||If I add a new item and select Report nothing happens !!!!
"Wickherm" <Wickherm@.discussions.microsoft.com> a scris în mesajul de
ºtiri:1C7124B2-4E9D-42D1-AABF-FFD029FC2276@.microsoft.com...
> Don't know if this is related. In the RTM, there are issues with the add
> report wizzard. If you use the add item, then select report everything
> seems
> to works ok.
> "Sorin Sandu" wrote:
>> When I try to add a new Report to a Report Server project I get the
>> following error and I can't add it to project.
>> TITLE: Microsoft Visual Studio
>> --
>> Exception of type 'System.Runtime.InteropServices.COMException' was
>> thrown.
>> --
>> BUTTONS:
>> OK
>> --
>> ===================================>> Exception of type 'System.Runtime.InteropServices.COMException' was
>> thrown.
>> (Microsoft Visual Studio)
>> --
>> Program Location:
>> at
>> Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.OnHierarchyNodeAppending(IHierarchyNode
>> node, IHierarchyNode parentNode)
>> at
>> Microsoft.DataWarehouse.VsIntegration.Hierarchy.Hierarchy.Add(IHierarchyNode
>> node, IHierarchyNode parentNode)
>> at
>> Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.AddExistingFileToProject(IFileProjectNode&
>> parentNode, String name, String fullPath, VSADDITEMOPERATION
>> dwAddItemOperation)
>> at
>> Microsoft.DataWarehouse.VsIntegration.Shell.Project.Extensibility.ProjectItemsExt.AddFromFile(String
>> FileName)
>> at
>> Microsoft.ReportDesigner.Wizards.ReportWizardForm.OnFinish(CancelEventArgs
>> e)
>>
>>

Sunday, March 25, 2012

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Thursday, March 22, 2012

Adding a class to a report project

Hey there. I have been trying to add a class to my report project and I have
not been able to. I have added another project to the sln file to try to get
around this. But I have found no way to add a reference to the new class, so
trying to instaniate the class blows up.
All I want the class for is a central location for all of my embedded code.
I just want to create the custom functions I need one time and include that
file in every report project I may have and be done with it.
Seems reasonable no?
If you could point me in the right direction, that would be great.
TIA
reply here or at rbinns@.<nospam>NationalDiabetic.comTry this article it has a lot of good info on writing custom assemblies and
step by step examples. It is one of the only ones I have found on the
internet that is even remotely helpful
http://blogs.sqlxml.org/bryantlikes/articles/824.aspx
"Pinolian" wrote:
> Hey there. I have been trying to add a class to my report project and I have
> not been able to. I have added another project to the sln file to try to get
> around this. But I have found no way to add a reference to the new class, so
> trying to instaniate the class blows up.
> All I want the class for is a central location for all of my embedded code.
> I just want to create the custom functions I need one time and include that
> file in every report project I may have and be done with it.
> Seems reasonable no?
> If you could point me in the right direction, that would be great.
> TIA
> reply here or at rbinns@.<nospam>NationalDiabetic.com
>

Sunday, March 11, 2012

Add sdf file to my project when my sources are on remote server

I have an application that runs on a PDA and manage a database (.sdf) file I use C# with visual studio 5.0.

What I want to do is to add the database file (.sdf) to my project files and open a connection to it.

The problem is that all my source file are stored on remote machine and not locally on my machine and the .sdf file is also stored with the project source files.

When I try to add the file to the project I get the following error fro the data source configuration wizard :

"An error occured while retrieving the information from the database"

DRIVE_REMOTE

Parameter Name : N:\

I get the same error also when I try to open a new connection to the file from the server explorer. When i copy the file to drive "C" I can open a connection to it with no errors.


Software engineer

Hello,

Remotely opening an sdf file (SSC database) is not supported. From desktop to device (DB on a device) access is possible, but, I don't think the other way is.

Thanks

Udaya.

Add sdf file to my project when all my sources are on remote machine

I posted this question in the past and did not get any answer.

I put all my sources on a remote server mainly for backup purposes (the remote server is backuped every day) but when I have the .sdf file I can not open it from the visual studio 2005 configuration server here is the description of the problem:

I have an application that runs on a PDA and manage a database (.sdf) file I use C# with visual studio 2005

What I want to do is to add the database file (.sdf) to my project files and open a connection to it.

The problem is that all my source file are stored on remote machine and not locally on my machine and the .sdf file is also stored with the project source files.

When I try to add the file to the project I get the following error fro the data source configuration wizard :

"An error occured while retrieving the information from the database"

DRIVE_REMOTE

Parameter Name : N:\

I get the same error also when I try to open a new connection to the file from the server explorer. When i copy the file to drive "C:" I can open a connection to it with no errors.

I encounter this problem too .
It looks like Sqlce do not allowed connect remotely .
Currently have no answer for this problem.
|||Look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2191231&SiteID=1|||

Apparently you can't open SDF database on network shares but in this case you don’t have to.

Few possible solutions to that:

- Add a build step to copy database to a local drive and use that copy in the project.

- Build from local drive and add a script executed at particular time to copy everything to the remote server so it would be backed up.

- Start using version control system (e.g. VSS) instead of rather primitive remote copy.

Last one is the best in my opinion.

Add sdf file to my project when all my sources are on remote machine

I posted this question in the past and did not get any answer.

I put all my sources on a remote server mainly for backup purposes (the remote server is backuped every day) but when I have the .sdf file I can not open it from the visual studio 2005 configuration server here is the description of the problem:

I have an application that runs on a PDA and manage a database (.sdf) file I use C# with visual studio 2005

What I want to do is to add the database file (.sdf) to my project files and open a connection to it.

The problem is that all my source file are stored on remote machine and not locally on my machine and the .sdf file is also stored with the project source files.

When I try to add the file to the project I get the following error fro the data source configuration wizard :

"An error occured while retrieving the information from the database"

DRIVE_REMOTE

Parameter Name : N:\

I get the same error also when I try to open a new connection to the file from the server explorer. When i copy the file to drive "C:" I can open a connection to it with no errors.

I encounter this problem too .
It looks like Sqlce do not allowed connect remotely .
Currently have no answer for this problem.
|||Look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2191231&SiteID=1|||

Apparently you can't open SDF database on network shares but in this case you don’t have to.

Few possible solutions to that:

- Add a build step to copy database to a local drive and use that copy in the project.

- Build from local drive and add a script executed at particular time to copy everything to the remote server so it would be backed up.

- Start using version control system (e.g. VSS) instead of rather primitive remote copy.

Last one is the best in my opinion.

Add runtime rows to sql express database

Hi All,

I have a c# project with an sql express database which is bound to a datagridview via a dataset.

I would like to allow the users to import data into the database from a text file.

How does one go about adding rows and filling in the column data programatically? Do I add the to datagridview? the database? the bindingsource?

Thank you,

Paul

hi Paul,

it depends on your requirements.. you can direclty load the database via BULK INSERT statement like in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=723808&SiteID=1 ....
or you can read the flat file and parse it, loading a visual UI to be presented to the user for further manipulation, and finally load the destination database... if this is the case I'd just add the "imported" rows to the underlying DataView of the UI...

regards

|||

Thanks for the help and the links. I'll post back what I did.

Paul

|||

Wrote a class to convert the txt to xml but

it doens't work on a unbound grid. Oh well nice try...

Maybe I could unbin, set the data, and then

rebind. Looking into it now.

//this works fine on unbound grid.

dataSet1.ReadXml(filePath);

dataGridView1.DataSource = dataSet1;

dataGridView1.DataMember = "student";

Thursday, March 8, 2012

Add new user?Dial-up replication?

after I replicated two project server database in two sql server, I don`t add new user or modify old user in project server,Why??
and another my problem:
How replication with Dial-up connection(I replicated with LAN)??
Please help me
Thanks
Bita
Message posted via http://www.sqlmonster.com
I don't understand your first question. Are you saying you are unable to
modify any old user or add a new one? If so what is the error message you
are getting.
In reference to your second question, consult this kb article
http://support.microsoft.com/default...b;en-us;241149
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Bita Joghataie via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:46b960085fdb4a61a0d40f13df7c622f@.SQLMonster.c om...
> after I replicated two project server database in two sql server, I don`t
add new user or modify old user in project server,Why??
> and another my problem:
> How replication with Dial-up connection(I replicated with LAN)??
> Please help me
> Thanks
> Bita
> --
> Message posted via http://www.sqlmonster.com

Tuesday, March 6, 2012

Add New Database Error "object reference not set to an instance of an object"

Hi,

I'm new to SQL database.

When I add a new item to project in VS2005: Project-->Add New Item --> Sql Database I got a error msg "object reference not set to an instance of an object" after click "Add" button. The SQL Server Express is running. How do I fix this problem?

Any help would be appreceiated.

CO22006

Moving to the SQL forum.

-Tim <MSFT>

Saturday, February 25, 2012

Add into 2 tables (VS 2005)

Hi, not sure if I've posted at the right area but here goes:

I'm working on a project using Visual Studio 2005 and SQL express server for the database.

Since I'm using VS 05, I use datasources to select, insert, delete, update from my db.

Question is, how do i insert, delete, update from 2 tables using datasource? is it even allowed?

If it's not allowed, are there any solutions other than using the codebehind?

Please help. Thank you.

hi galovesongs,

you can you any of these two solutions

1. on the vs.net

Making use of system.transaction

you can put two of your delete, insert, update inside a transaction

placing two statement in a transaction context

is the best way to go.

pls find a four page article on this link

http://www.devx.com/vb/Door/10608

2. on the database

you can make use of the trigger

i moved the thread here. for better opinions

Add existing database to a Project

I have an existing database with many procedures that has been managed ad hoc
in the past. I would like now with SSMS to move the database into a project
with an alter script for each object and maintain the project in source
control.
Does anyone know a simple way to acheive this rather than manually scripting
each object?
Is there a better way of doing this?
Thanks for your suggestions.
"David" wrote:

> I have an existing database with many procedures that has been managed ad hoc
> in the past. I would like now with SSMS to move the database into a project
> with an alter script for each object and maintain the project in source
> control.
> Does anyone know a simple way to acheive this rather than manually scripting
> each object?
> Is there a better way of doing this?
> Thanks for your suggestions.
Hi,
I have the same problem with a really big existing database, with many
stored procedures. So I'm very interested in a solution for this too.
Did you get any suggestions so far?
Markus (Germany)

Friday, February 24, 2012

Add constant variable to report project

I'd like to add a constant string variable to my report project.
Something like stCOMPANY_NAME. I'd like the reports to be portable to some
of our other plants so it would be nice so be able to change the company
name on the header of all the reports by just changing one constant
somewhere in the project. I know this could be done at the report level
(putting a constant in the code block for the report), but can it be done at
the project, public level ?I'm sure there must be an OLEDB/ODBC driver for reading in text files.
Stick in a text file and read it in as a dataset.
If you use the OLEDB provider for ODBC drivers, you can read from Excel.
Hope that helps.
Chris
D Witherspoon wrote:
> I'd like to add a constant string variable to my report project.
> Something like stCOMPANY_NAME. I'd like the reports to be portable
> to some of our other plants so it would be nice so be able to change
> the company name on the header of all the reports by just changing
> one constant somewhere in the project. I know this could be done at
> the report level (putting a constant in the code block for the
> report), but can it be done at the project, public level ?|||You can make Company name as parameter.
Kiran
"Chris McGuigan" <chris.mcguigan@.zycko.com> wrote in message
news:%23$PMtNocFHA.3040@.TK2MSFTNGP14.phx.gbl...
> I'm sure there must be an OLEDB/ODBC driver for reading in text files.
> Stick in a text file and read it in as a dataset.
> If you use the OLEDB provider for ODBC drivers, you can read from Excel.
> Hope that helps.
> Chris
> D Witherspoon wrote:
>> I'd like to add a constant string variable to my report project.
>> Something like stCOMPANY_NAME. I'd like the reports to be portable
>> to some of our other plants so it would be nice so be able to change
>> the company name on the header of all the reports by just changing
>> one constant somewhere in the project. I know this could be done at
>> the report level (putting a constant in the code block for the
>> report), but can it be done at the project, public level ?
>

Thursday, February 9, 2012

Actually, its a T-SQL question

I am trying to update a project using plaintext sql commands to stored procedures. I am currently working on

orderby = request.querystring("orderby")
if orderby = "" then orderby = "name"
sql="select * from products order by " & orderby"
rs.open sql,conn,3,3

(yes, that's classic ASP but its the t-sql that's a problem, not the aspWink [;)])
orderby can be "name","code","qty","price"
The stored procedure I have is

CREATE PROCEDURE DBO.GetSortedProducts_sp
@.sort int
AS</P><P> SELECT
*
FROM
PRODUCTS
ORDER BY
case
when @.sort=1 then name --varchar(100)
when @.sort=2 then code --varchar(20)
when @.sort=3 then qty --int
when @.sort=4 then price --decimal 9(19,4)
end
GO

Only @.sort=3 and @.sort=4 work. For @.sort=1 and @.sort=2, I get the following error:
Server: Msg 8114, Level 16, State 5, Procedure GetSortedProducts_sp, Line 5
Error converting data type varchar to numeric.
I have included the column types in the stored procedure above for reference.
If I write out the stored procedure in Query Analyzer I get the following error:
Syntax error converting the varchar value 'Prod-1' to a column of data type int.
Note that if I use "select * from products order by code" then it works fine. Any help please?

Confused [8-)]|||My guess is when you are using CASE the columns should all be of same datatype.|||As Dinakar said, with the CASE construct you've used all options must result in the same datatype.
Try this approach instead:
SELECT
*
FROM
PRODUCTS
ORDER BY
case when @.sort=1 then name end,
case when @.sort=2 then code end,
case when @.sort=3 then qty end,
case when @.sort=4 then price end

|||interesting...thx