Showing posts with label control. Show all posts
Showing posts with label control. Show all posts

Thursday, March 22, 2012

Cannot open user default database, login fails

hi:
I got the problem, which lots of people might encounter before.

In my case, I use login control and sqlexpress to build a login page.
when password & user name were entered. It gave me:
"Cannot open user default database, login fails"

The solution given by msdn is:

SQL Server 2005

You can use the sqlcmd utility to change the default database in SQL Server 2005. To do this, follow these steps:

1.Click Start, click Run, type cmd, and then press ENTER. 2.Use one of the following methods, depending on the kind of authentication that the SQL Server login uses:

?If

the SQL Server login uses Microsoft Windows authentication to connect

to the instance, type the following at the command prompt, and then

press ENTER:

sqlcmd –E -S InstanceName –d master

?If

the SQL Server login uses SQL Server authentication to connect to the

instance, type the following at the command prompt, and then press

ENTER:

sqlcmd -S InstanceName -d master -U SQLLogin -P Password

Note InstanceName is a placeholder for the name of the SQL Server 2005 instance to which you are connecting. SQLLogin is a placeholder for the SQL Server login whose default database has been dropped. Password is a placeholder for the SQL Server login password.3.At the sqlcmd prompt, type the following, and then press ENTER:

ALTER LOGIN SQLLogin WITH DEFAULT_DATABASE = AvailDBName

Note AvailDBName is a placeholder for the name of the existing database that can be accessed by the SQL Server login in the instance.4.At the sqlcmd prompt, type GO, and then press ENTER.

I wonder what are InstanceName, SQLLogin & AvailDBName. It would be nice if someone can give me a specific example, since I am not sure how to type them in a command line. :)

You're in the wrong forum. Try here: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

-Jamie

Thursday, March 8, 2012

Cannot limit results with ReportViewer

Hello,
I have been attempting to set up a report using the ReportViewer
control in VS2005. The report graphs the TOP X number of records based
on certain criteria. Naturally, I modified the report with a filter
for the TOP N results. This works, however, in the case of ties on the
last entry, all tied instances will get graphed. In my case, this may
be alot of entries causing the bar graph image to display unreadable
data since there are too many result to graph.
So, I attempted the following with no success since the server is SQL
2000 and not SQL 2005:
- Using the TOP keyword in the select query does not work with a
parameter (ie SELECT TOP @.rowcount FROM...) since I am using SQL 2000.
- I cannot use a stored procedure and use the "SET ROWCOUNT" command
with the select query.
- I cannot use the LIMIT keyword in SQL 2000.
Can anyone come up with a solution, other than upgrading to SQL 2005?
Thanks in advance,
Andrewcheck this one......
SELECT w1.CATEGORYID, w1.UNITSINSTOCK,COUNT(*) As Rank
FROM
(SELECT CATEGORYID, UNITSINSTOCK
FROM PRODUCTS
GROUP BY CATEGORYID, UNITSINSTOCK ) AS w1
INNER JOIN
(SELECT CATEGORYID, UNITSINSTOCK
FROM PRODUCTS
GROUP BY CATEGORYID, UNITSINSTOCK ) AS w2
ON w1.CATEGORYID = w2.CATEGORYID
AND w1.UNITSINSTOCK <= w2.UNITSINSTOCK
GROUP BY w1.CATEGORYID, w1.UNITSINSTOCK
HAVING COUNT(*) <=@.parameter
ORDER BY w1.CATEGORYID,w1.UNITSINSTOCK DESC
Regards
Dinesh
therealbigcoops@.gmail.com wrote:
> Hello,
> I have been attempting to set up a report using the ReportViewer
> control in VS2005. The report graphs the TOP X number of records based
> on certain criteria. Naturally, I modified the report with a filter
> for the TOP N results. This works, however, in the case of ties on the
> last entry, all tied instances will get graphed. In my case, this may
> be alot of entries causing the bar graph image to display unreadable
> data since there are too many result to graph.
> So, I attempted the following with no success since the server is SQL
> 2000 and not SQL 2005:
> - Using the TOP keyword in the select query does not work with a
> parameter (ie SELECT TOP @.rowcount FROM...) since I am using SQL 2000.
> - I cannot use a stored procedure and use the "SET ROWCOUNT" command
> with the select query.
> - I cannot use the LIMIT keyword in SQL 2000.
> Can anyone come up with a solution, other than upgrading to SQL 2005?
> Thanks in advance,
> Andrew

Sunday, February 19, 2012

Cannot have two flat file destinations in a package (possible bug)?

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

Bogey1 wrote:

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

You can only have one data flow per data flow task.|||You can have more than one Data Flow Task per package and multiple Data Connections. Try that way. Two Data Connections and two Data Flows Task.|||

Bogey1 wrote:

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

Are you using the same Flat File Connection Manager for both Flat File Destinations? It sounds as though you are.

-Jamie

Cannot have two flat file destinations in a package (possible bug)?

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

Bogey1 wrote:

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

You can only have one data flow per data flow task.|||You can have more than one Data Flow Task per package and multiple Data Connections. Try that way. Two Data Connections and two Data Flows Task.|||

Bogey1 wrote:

During my development of a ssis package i've noticed that when creating two control flows that pulling data from seperate tables, each going to its own flat file, that the second keeps the attributes of the column names from the first. So when I create my second flat file, not only does it have the names of its correct columns but has the name of the the first flat file.

I'm hoping that I've explained the correctly. I'll provide more info "OR" I can provide the code to package if anyone would like.

Are you using the same Flat File Connection Manager for both Flat File Destinations? It sounds as though you are.

-Jamie

Thursday, February 16, 2012

Cannot get rid of SQL server 2005 Developer Edition Installation

I cannot uninstall the SQL Server 2005 Developer Edition. I have run the uninstall from the control panel for ALL of the SQL Server 2005 components. They are no longer listed in the installed programs list. I have done the uninstall with both the Control panel and the command line.

When I try to install SQL server Express (Downloaded from the web last night) It will not install. The error message is: TITLE: Microsoft SQL Server 2005 CTP Setup
-

There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information.


For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&ProdVer=9.00.1116&EvtSrc=setup.rll&EvtID=50000&EvtType=setup%5Csqlsetupactions.cpp@.ActivateLoggingAction@.sqls::ActivateLoggingAction::perform@.0x80070643

-
BUTTONS:

OK
-
When navigating to the web site via the help button the message that is displayed is:

Details ID: 50000 Source: setup.rll We're sorry There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.


I've been trying to get rid of this installation for almost a month now, so that I can install the SQL 2005 Express edition for use with web security. I've done everything except wipe the machine and reinstall the operating system.

Can someone tell me how to uninstall the thing via the registry or something?

Hi,
There's a cleanup tool that's available. Try this, maybe it could help...
http://go.microsoft.com/fwlink/?linkid=47065
cheers,
Paul June A. Domag|||Sorry, that didn't work. The title of the cleanup was VS 2005 beta 1 cleanup, not MS SQL Server 2005 cleanup. It did do some cleanup, but no help for me.|||

Hi,

could you post the setup log file located at %programfiles%\Microsoft SQL Server\90\Setup

cheers,

Paul June A. Domag

|||I have same problem. I can't get rid of SQL 2005 June CTP. Which file are you asking to post? There are many files in that folder.|||

Hi,

Im looking for a log file. Usually its in the LOG folder. It is also in txt format. It stores the information during a setup...

cheers,

Paul June A. Domag

|||Which log file? There are many log files in that folder. Can you give us the name of the one you want?|||

Hi,

My installation has a summary.txt file. I think that would be helpful. But If you want to be more specific I suggest looking in each log file and see where the error occurs and post the log file here...

cheers,

Paul June A. Domag

Sunday, February 12, 2012

cannot format numbers to CSV Destination file

Hi,

I would like to know if there is any trick to convert numbers to csv files. I don't have any control to format the numbers.

Source: Sql server

for example:

select cast( 1 as float)/ cast(201 as float)

Destination:CSV file

the output of the file is 4,9751243E-3

i don't want to have scientific notation on the number. I want the result to be 0,00497512437810945. how can i do it?

I tried to change the type of destination columns to String or numeric but nothing works. what is the influence of changing data type in the destination columns e the output to files?

I tried using convert but with the same results.

Can it be because of local settings or something else?

thanks

prb222

I am having this SAME problem and would be very happy if someone could provide a solution. I have found the only way to keep a long string of numbers in text format, is to switch it to text and then click on each individual cell and then the formula bar. This will not work when there are thousands of rows of records - way too much manual work. There has to be some way for the numbers to stay in their original format. HELP!!|||

Hi,

If I use a data viewer, I see the normal value but in the csv it gets converted to scientific.

I found this workaround. In case you do not need more precision, you should be fine.

select cast(cast( 1 as float)/ cast(201 as float) as decimal(28,28)) as myOutput

It generates the csv like this

.0049751243781094500000000000

if I open it in Excel I get this

0.00497512437810945

Philippe

|||I was having the same problem. I asked my co-worker if he knew, and said they put four quotes then concatenate in the select statement like '''' + field_name.

cannot format numbers to CSV Destination file

Hi,

I would like to know if there is any trick to convert numbers to csv files. I don't have any control to format the numbers.

Source: Sql server

for example:

select cast( 1 as float)/ cast(201 as float)

Destination:CSV file

the output of the file is 4,9751243E-3

i don't want to have scientific notation on the number. I want the result to be 0,00497512437810945. how can i do it?

I tried to change the type of destination columns to String or numeric but nothing works. what is the influence of changing data type in the destination columns e the output to files?

I tried using convert but with the same results.

Can it be because of local settings or something else?

thanks

prb222

I am having this SAME problem and would be very happy if someone could provide a solution. I have found the only way to keep a long string of numbers in text format, is to switch it to text and then click on each individual cell and then the formula bar. This will not work when there are thousands of rows of records - way too much manual work. There has to be some way for the numbers to stay in their original format. HELP!!|||

Hi,

If I use a data viewer, I see the normal value but in the csv it gets converted to scientific.

I found this workaround. In case you do not need more precision, you should be fine.

select cast(cast( 1 as float)/ cast(201 as float) as decimal(28,28)) as myOutput

It generates the csv like this

.0049751243781094500000000000

if I open it in Excel I get this

0.00497512437810945

Philippe

|||I was having the same problem. I asked my co-worker if he knew, and said they put four quotes then concatenate in the select statement like '''' + field_name.