Friday, March 30, 2012
putting Word docs, etc in DB
want to look at Word documents, other text files, maybe
Excel spreadsheets.
Would it be best to put the location of the files in a
database and have our network mappings set up for anyone
in the company can see these files
or
Has anyone put the actual Word document in a SQL Server
(store the binary data in an Image data type) and then
tried using that to bring up the Word document? I think
storing the data from the file into an Image data type
should be fine, but I'm not sure how you'd get Word to
work with the data in the database and display the
contents.
The first option will work but there are some networking
issues. I'm just wondering if a database solution might
work and how you'd do that.
TIA,
Doughttp://www.aspfaq.com/show.asp?id=2149
"Doug" <anonymous@.discussions.microsoft.com> wrote in message
news:5a3e01c4009a$e6919280$a501280a@.phx.gbl...
> We have a project when multiple people in the company will
> want to look at Word documents, other text files, maybe
> Excel spreadsheets.
> Would it be best to put the location of the files in a
> database and have our network mappings set up for anyone
> in the company can see these files
> or
> Has anyone put the actual Word document in a SQL Server
> (store the binary data in an Image data type) and then
> tried using that to bring up the Word document? I think
> storing the data from the file into an Image data type
> should be fine, but I'm not sure how you'd get Word to
> work with the data in the database and display the
> contents.
> The first option will work but there are some networking
> issues. I'm just wondering if a database solution might
> work and how you'd do that.
> TIA,
> Dougsql
putting Word docs, etc in DB
want to look at Word documents, other text files, maybe
Excel spreadsheets.
Would it be best to put the location of the files in a
database and have our network mappings set up for anyone
in the company can see these files
or
Has anyone put the actual Word document in a SQL Server
(store the binary data in an Image data type) and then
tried using that to bring up the Word document? I think
storing the data from the file into an Image data type
should be fine, but I'm not sure how you'd get Word to
work with the data in the database and display the
contents.
The first option will work but there are some networking
issues. I'm just wondering if a database solution might
work and how you'd do that.
TIA,
Doughttp://www.aspfaq.com/show.asp?id=2149
"Doug" <anonymous@.discussions.microsoft.com> wrote in message
news:5a3e01c4009a$e6919280$a501280a@.phx.gbl...
> We have a project when multiple people in the company will
> want to look at Word documents, other text files, maybe
> Excel spreadsheets.
> Would it be best to put the location of the files in a
> database and have our network mappings set up for anyone
> in the company can see these files
> or
> Has anyone put the actual Word document in a SQL Server
> (store the binary data in an Image data type) and then
> tried using that to bring up the Word document? I think
> storing the data from the file into an Image data type
> should be fine, but I'm not sure how you'd get Word to
> work with the data in the database and display the
> contents.
> The first option will work but there are some networking
> issues. I'm just wondering if a database solution might
> work and how you'd do that.
> TIA,
> Doug
Wednesday, March 28, 2012
putting dbo explicitly in select staetement
I have witten a lot of stored procedures in my project where I did not put dbo before the user tables.My colleague told me that I have to put dbo for all statements other there could be a problem.
Any thought?,
Please assist.
Arkhan:
There are at least a couple of places in which the owner name prefix -- dbo -- is required including (1) naming of a scalar functions and (2) objects used with schemabinding. In addition, if your "shop standards" are to always designate object names with the owner name then you need to do so.
I can think of at least one situation in which I prefer that objects NOT be owned by dbo. This is at least somewhat controversial so take it with a grain of salt. In DTS "staging" tables I like to have a designated table owner so that that owner has the right to truncate the table without needing the database owner privilege. This does not figure to be relevant to your problem. It is good practice to include the owner name as part of your qualified name. One thing that worries about your question has to do with the practice of deployment of privileges.
I do not like it when I see scores of tables or other database objects that are owned by many different database users. When I see this type of stuff my knee-jerk reaction is that privileges are beging deployed to liberally. And I would guess that if you and your colleagues are seeing many problems from NOT including the owner name that you likely have this privilege problem.
Short answer: Include the dbo portion of the name.
|||Dave
I've heard it said that not including the schema owner (usually DBO) on your object prefix can result in a "Compile lock" against your stored procedure while the client determines whether there is an object in existence for its own schema. In this situation, multiple users executing the same stored procedure would suffer from a queuing effect as each would place a compile lock on the procedure (or statement).
That being said, I've never been able to repro this is a testing environment and I have yet to see any white papers or KB articles that discuss this so I'd love it if somebody could chime in on this.
|||Specifying the owner can help the system find the stored procedure faster. It also prevents issues if someone creates the same name procedure with a different owner (or schema in 2005) by mistake. At least if everyone uses two-part names, they will be less likely to make mistakes.
As for the compile locks, I have reproduced recompile locks in my stored procedures. I'm not 100% how I did it, but it seemed to be with temporary tables stored procedures. I added dbo in the front of each stored procedure and table name within the stored procedure and it elliminated most of the problems we had.
Friday, March 23, 2012
push data to crystal report asp.net
I am having two problems. First when I attempt to use a sql command I am able to create the report
but when I attempt to push the data to it I get a login failed error. When I correct this I get the original
data that was used to format the report not the modified data that I am attempting to push to it.
Here is the code.
Sub BindReport2()
Dim oRpt As New CrystalReport1
Dim myConnection As New SqlClient.SqlConnection
myConnection.ConnectionString = "Server=WOODS1;Database=WEB_TEST;User ID=WebRep;Password=webrep;Trusted_Connection=False"
Dim MyCommand As New SqlClient.SqlCommand
MyCommand.Connection = myConnection
MyCommand.CommandText = "select fname, lname, address1, city, state " & _
"from T1, T2 " & _
"where T1.empid = T2.empid and state = 'New York' "
MyCommand.CommandType = CommandType.Text
Dim MyDA As New SqlClient.SqlDataAdapter
MyDA.SelectCommand = MyCommand
Dim myDS As New DataSet
'This is our DataSet created at Design Time
MyDA.Fill(myDS, "Command")
'You have to use the same name as that of your Dataset that you created during design time
'oRpt.Database.Tables.Item("Command").SetDataSource(myDS)
' This is the Crystal Report file created at Design Time
oRpt.SetDataSource(myDS)
' Set the SetDataSource property of the Report to the Dataset
CrystalReportViewer1.ReportSource = oRpt
'oRpt.SetDatabaseLogon("user","password","server","database")
oRpt.SetDatabaseLogon("WebRep", "webrep", "WOODS1", "web_test")
CrystalReportViewer1.RefreshReport()
' Set the Crystal Report Viewer's property to the oRpt Report object that we created
End Sub
My Second issue is similar though involves using a dataset. I am able to push the data to the report if
my dataset only contains one table if it contains more than one I get no data returned to the report.
Here is the code.
Sub BindRep()
Dim oRpt As New CrystalReport2
Dim myConnection As New SqlClient.SqlConnection
myConnection.ConnectionString = "Server=WOODS1;Database=WEB_TEST;User ID=WebRep;Password=webrep;Trusted_Connection=False"
Dim strSQL As String = "select fname, lname, address1, city, state " & _
"from T1, T2 " & _
"where T1.empid = T2.empid and state = 'New York' "
Dim objAdapter As New SqlClient.SqlDataAdapter(strSQL, myConnection)
Dim objDataSet As New Dataset1
objAdapter.Fill(objDataSet, "T1, T2")
oRpt.SetDataSource(objDataSet)
' Set the SetDataSource property of the Report to the Dataset
CrystalReportViewer1.ReportSource = oRpt
End Sub
I have been able with the above code using a dataset that contains only one table to push the correct data
to the report. Any help on this issue whould be greatly appreciated.I dunno what database you're using, but I would have thought your problem occurs becuse of your SQL syntax/structure, where's your:
AS T1 INNER JOIN T2 ON (T1.empid = T2.empid )
???
If you don't join them on at least one field, the SQL parser can't resolve the WHERE clause.
Davesql
Friday, March 9, 2012
Pull data from Two tables
normally just use Access.
I have two tables for a little project manager I made. After updates I
sent an email to the user. I need to populate the user based on the
"Assigned To" field I use, but I only log the username and not the
email address. Is there a way to associate the "Assigned To" to the
User's account in the "User" table so that I can pull thier email
address through code?
Thanks
ChuckPlease post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it.|||Thank you for the feedback, obviously your a genius, but I do not know
what to post since I already stated I am new to this. My question was
of a theory nature, as I do not know what DRI and contraints are.
I will try to simply my question even more...
1. I have a database with two tables Case and Users
2. When I finish updating a case I want to send an email to the
currently assigned users.
3. The email address is not stated in the Case table, so I would like
to know if there is a way when I guery the database I can also pull
data from another Table.|||Hey Chuck,
What you're talking about is the guts of SQL: the JOIN. A newsgroup is
really not the best place to learn how to write SQL (from the ground
up), because it's gonna take some practice (and some background
knowledge) before you're really ready to even ask a question. There's
a couple of really good books on basic SQL out there; I'd recommend Be
Forta's Sams Teach Yourself SQL in 10 Minutes as a good primer on the
language.
Anyway, I think you might be looking at something like the following:
SELECT * --* is bad in production
FROM [CASE] c JOIN [Users] u ON c.[Assigned to] ON u.[UserName]
--note that case is a reserved word in SQL. Also, column names without
spaces are easier to manage.
Anyway, good luck on your quest.
Stu|||Ok, thought what I was thinking was more simple, but I understand that
its more of a loaded question.
Thanks for the feedback and suggestions, I will start reading up.
Chuck|||"cvillard" <cvillard@.gmail.com> wrote in message
news:1124752154.644452.160570@.f14g2000cwb.googlegr oups.com...
> Thank you for the feedback, obviously your a genius, but I do not know
> what to post since I already stated I am new to this. My question was
> of a theory nature, as I do not know what DRI and contraints are.
DRI=Data Referential Integrity.
The important part is DDL - Data Definition Language.
What we need is the script to create your tables.
Something lie
CREATE TABLE cases (
case varchar(30),
case_id int
)
CREATE TABLE email (
case_id int,
case_email varchar(30)
)
DRI would include keys to make sure you can't have a case_id in email table
that doesn't exist in table cases, that case_email has a valid form, etc.
So, now
sounds like you want something like
select e.case_email from email as e inner join cases as c on
e.case_id=c.cases_id where e.case_id = 5
> I will try to simply my question even more...
> 1. I have a database with two tables Case and Users
> 2. When I finish updating a case I want to send an email to the
> currently assigned users.
> 3. The email address is not stated in the Case table, so I would like
> to know if there is a way when I guery the database I can also pull
> data from another Table.
Publishing Web Application
Hello to everybody.
I got a problem like this:
I developped a project using Visual Studio 2005 Standard Edition on a XP pro x64 Machine using a developpemet data area on a SQL 2005 Express Edition.
Everything is ok, even the user and profile management. But when I try to publish my application on IIS (we're talking about a little Intranet), I get my problems. I think is important to say that the server is a Windows Server 2003 and data (database reproduced as a backup of the developpement one) are under an SQL 2005 Standard. The strange thing is that by publishing the "site" VS create a DB under SQL Std named with the path of local ASPNETDB.MDF.
I can reach everything, all data are ok, but when I pass the login page going to main menu on my web-application, I get this error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I think the problem is SQL STD and the fact that it's not "able" to manage MDF files.
I even tried to re-map the SQL DB (named simply as ASPNETDB on the SQL std) by adjusting the web.config file on connection type and user and password to reach the DB ASPNETDB but it does't work anyway.
Can anybody solve my problem?
Thank You
Can you post your connection string please|||This first is the original connection string in web.config defined in the developpement area:
<add name="ASPNETDBConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
This one is the connection to the server (SQL STD):
<add name="ASPNETDBConnectionString1" connectionString="Data Source=SERVER\SQLSERVER;Initial Catalog=ASPNETDB;Persist Security Info=True;User ID=user;Password=password" providerName="System.Data.SqlClient"/>
Thank You.
Mauro
Publishing to a remote SSL server
reports project to a solution. I used the reports manager to add a folder in
which to deploy the reports, but can't figure out where it is on the server.
When I try to deploy a report to 'https://www.projects.com/reportserver' I
get the following error: 'A connection can not be made to the report server
https://www.projects.com/ReportServer'. Any help to do the following:
1. Set up a folder on the server to deploy the datasource and reports so I
can xcopy
2. Be able to make a connection when I attempt to deploy a report from
VS.NET.
Would be appreciated.
Thanks.
DanI resolved this problem by first installing the data source then the report.
The report runs on the local server, but any attempt to run the report or
sample reports over the internet gives the error: 'Cannot find server or DNS
Error'. I'm publishing behind ISA 2004. Any suggestions?
Thanks.
Dan
"Dan Slaby" <dls@.newsgroup.nospam> wrote in message
news:ucM%23rdOjFHA.3568@.tk2msftngp13.phx.gbl...
> I've set up SQL Reports in 'https://www.projects.com/reports' and added a
> reports project to a solution. I used the reports manager to add a folder
> in which to deploy the reports, but can't figure out where it is on the
> server. When I try to deploy a report to
> 'https://www.projects.com/reportserver' I get the following error: 'A
> connection can not be made to the report server
> https://www.projects.com/ReportServer'. Any help to do the following:
> 1. Set up a folder on the server to deploy the datasource and reports so I
> can xcopy
> 2. Be able to make a connection when I attempt to deploy a report from
> VS.NET.
> Would be appreciated.
> Thanks.
> Dan
>|||Hello,
I'd like to confirm that both report server and SQL server are behind ISA
2004.
Please note that Windows authentication is not supported via Internet
because Kerbose/NTLM authentication need open too many ports via firewall
which is not proper for security purpose.
If you want to run the report over the internet, you may need to enable
anonymous access. You need to configure via report manager to enable
Iusr_<computername> account to have the proper permission to the proper
roles such as browser/content manager etc.
I suggest that you perform the following steps to narrow down the issue:
1. Run the report internally from another client computer with anonymous
access.
If the user can run the report internally successfully with anonymous
access, you may need to check the configuration of the ISA server.
To enable Anonymous Access to work with SQL Server Reporting Services,
enable Anonymous Access under Directory Security in IIS and set the default
account to IWAM_machinename
NOTE: By default SQL Server Reporting Services uses the IWAM_machinename
account to connect.
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Wednesday, March 7, 2012
Publish to Multiple folders
It seem like all of the reports must be sent to the same folder and then
moved, which is quite annoying. Am I missing something?
TIA
DeanI split the reports in the development environment to different projects.
Each project goes to a different folder.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Dean" <deanl144@.hotmail.com.nospam> wrote in message
news:OMxvOJpCIHA.748@.TK2MSFTNGP04.phx.gbl...
> Is it possible to publish reports in a project to different target
> folders? It seem like all of the reports must be sent to the same folder
> and then moved, which is quite annoying. Am I missing something?
> TIA
> Dean
>|||I agree that this is rather annoying.
If you have separate projects for each report how do you handle Shared
Data Sources? For instance, if you have 5 reports in 5 individual
projects all using the same shared data source, and that data source
changes, do you need to update all 5 projects, otherwise one will over
write the other?
On Oct 9, 10:33 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> I split the reports in the development environment to different projects.
> Each project goes to a different folder.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Dean" <deanl...@.hotmail.com.nospam> wrote in message
> news:OMxvOJpCIHA.748@.TK2MSFTNGP04.phx.gbl...
> > Is it possible to publish reports in a project to different target
> > folders? It seem like all of the reports must be sent to the same folder
> > and then moved, which is quite annoying. Am I missing something?
> > TIA
> > Dean|||I name the shared data source the same name in each project. Yes, I have to
update the data sources in each project but I only have to do it once on the
server. In RS 2005 you have the option of putting all your shared data
sources in one place which I have done. All the folders use the same shared
data sources.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Matt Penner" <mattpenner2007@.gmail.com> wrote in message
news:1191966220.593999.117590@.g4g2000hsf.googlegroups.com...
>I agree that this is rather annoying.
> If you have separate projects for each report how do you handle Shared
> Data Sources? For instance, if you have 5 reports in 5 individual
> projects all using the same shared data source, and that data source
> changes, do you need to update all 5 projects, otherwise one will over
> write the other?
> On Oct 9, 10:33 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
> wrote:
>> I split the reports in the development environment to different projects.
>> Each project goes to a different folder.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Dean" <deanl...@.hotmail.com.nospam> wrote in message
>> news:OMxvOJpCIHA.748@.TK2MSFTNGP04.phx.gbl...
>> > Is it possible to publish reports in a project to different target
>> > folders? It seem like all of the reports must be sent to the same
>> > folder
>> > and then moved, which is quite annoying. Am I missing something?
>> > TIA
>> > Dean
>|||Ah, thanks.
On Oct 10, 6:52 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> I name the shared data source the same name in each project. Yes, I have to
> update the data sources in each project but I only have to do it once on the
> server. In RS 2005 you have the option of putting all your shared data
> sources in one place which I have done. All the folders use the same shared
> data sources.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Matt Penner" <mattpenner2...@.gmail.com> wrote in message
> news:1191966220.593999.117590@.g4g2000hsf.googlegroups.com...
> >I agree that this is rather annoying.
> > If you have separate projects for each report how do you handle Shared
> > Data Sources? For instance, if you have 5 reports in 5 individual
> > projects all using the same shared data source, and that data source
> > changes, do you need to update all 5 projects, otherwise one will over
> > write the other?
> > On Oct 9, 10:33 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
> > wrote:
> >> I split the reports in the development environment to different projects.
> >> Each project goes to a different folder.
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >> "Dean" <deanl...@.hotmail.com.nospam> wrote in message
> >>news:OMxvOJpCIHA.748@.TK2MSFTNGP04.phx.gbl...
> >> > Is it possible to publish reports in a project to different target
> >> > folders? It seem like all of the reports must be sent to the same
> >> > folder
> >> > and then moved, which is quite annoying. Am I missing something?
> >> > TIA
> >> > Dean
Publish the cubes on the web portal
Is there the ability of publishing the cubes (which is built from an Analysis Services Project) on the web portal?
The purpose of this action is to let the BI users to do the analysis directly on the web portal.
The BI users can change the measure, slide and dice data, change the dimension (just like what you've done with the Analysis Services).
One of the options:
You can enable HTTP access to Analysis Services 2005 and let you users to access Analysis Services directly.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Saturday, February 25, 2012
publish report
Hello,
I have create a web base project that will programmatically publish report into report server 2005.
But when i run the code, i need to create a shared data source and set the DataSourceReference.
Is there any ways else so that i no need to create a shared data source but still can publish the report in report server 2005 using custom data source?
Thanks.
You don't have to use shared datasource. You can just define a report specific datasource, in which case, all the datasource properties are embedded in the rdl. http://msdn2.microsoft.com/en-us/library/ms159165.aspxMonday, February 20, 2012
Public Domain Version Control
I am looking for a public domain version control system for my SQL
server project. The public domain price is right, but if it works well
with either Enterprise Manager or Query Analyzer, that would be nice too.
Anyone got any recommendations or links?
JDIf by "public domain" you mean open source:
http://www.nongnu.org/cvs/
I'm not aware of any actual public domain SCM software.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Joe Delphi" <delphi561@.nospam.cox.net> wrote in message
news:ZLwef.74$xu.64@.fed1read01...
> Hi,
> I am looking for a public domain version control system for my SQL
> server project. The public domain price is right, but if it works well
> with either Enterprise Manager or Query Analyzer, that would be nice too.
> Anyone got any recommendations or links?
> JD
>