Showing posts with label unable. Show all posts
Showing posts with label unable. Show all posts

Sunday, March 11, 2012

Cascading Parameter Defaults

I've had good luck with driving reports with cascading parameters and
parameters with defaults. So far though, I've been unable to combine these
concepts.
Using the example mentioned in BOL, I'd like to have a division parameter
choice drive a department parameter dropdown. When the department dropdown
is populated, is there any way to specify a default value? So far, my
attempts to do so have failed - with no default being chosen and no errors
appearing.
Does anyone know how I might be able to accomplish this?I was able to use defaults with cascading parms. In my scenario, I wanted
the user to choose the division (I'm actually using something else), but then
have the option to choose the department. Basically, the report would show
data for the entire division if the department parm wasn't choosen.
The only way I could get this to work was to use a default for the
department parm. I set the default to "non-queried" and the formula equal to
="" (and empty string). Also, the department parm is checked off to allow
null and blank values.
At first this didn't work because the default value must be a valid value in
the department dataset that populates the dropdown. My fix was to union in
a select statement tothe dataset with the default empty string value. Here's
that sql:
SELECT '' DeptID, '' DeptName
UNION ALL
SELECT DeptID, DeptName FROM DeptTable
WHERE DivID = @.DivID
ORDER BY DeptName
Now, when the division dropdown is choosen, the cascade parm populates the
department dropdown. But since the default is set to "", and "" is a valid
choice in the recordset - RS is happy.
The only thing else I had to do was have the actual report dataset know how
to handle the department as an empty string. No biggie.
Mike, to apply this to your scenario, I think the key is making sure the
default value is always in the dataset for the dept dropdown.
Hope this helps, Frank

Tuesday, February 14, 2012

Can't view Locks / Process ID

Hi,
We have SQL 7 running on Windows 2000 Server. For some reason we are
unable to view Locks / Process ID from workstations running Windows XP
SP2 with Enterprise Manager. Nothing shows up in the window on the
right. All it's says at the top of the window is "There are no items to
show in this view" If we use Enterprise Manager on the server, we can
view the Locks / Process ID. We can view both, Process Info and Locks /
Object from the workstations and server, just not the Locks / Process
ID. We used to, but I don't know what changed. I'm thinking it might
have to do with upgrading to XP SP2, or a Windows update, but I'm not
sure.
Has anyone out there experienced this? Or does anyone know the
solution?
Thanks,
MarkHave you tried reinstalling the Client tools on Affected boxes. Also if you
could start the profiler trace in the background and check if its running
any queries.
HTH
Vishal|||Vishal Gandhi wrote:
> Have you tried reinstalling the Client tools on Affected boxes. Also if you
> could start the profiler trace in the background and check if its running
> any queries.
> HTH
> Vishal
I have tried reinstalling the client tools. I even installed them on a
new PC. Same results. I don't know much about SQL, I did start the
profiler and it was capturing data. I'm not sure what you mean by
running it in the background and see if it is running any queries.
Thanks,
Mark|||Vishal Gandhi wrote:
> Have you tried reinstalling the Client tools on Affected boxes. Also if you
> could start the profiler trace in the background and check if its running
> any queries.
> HTH
> Vishal
I have tried reinstalling the client tools. I even installed them on a
new PC. Same results. I don't know much about SQL, I did start the
profiler and it was capturing data. I'm not sure what you mean by
running it in the background and see if it is running any queries.
Thanks,
Mark

Can't use Virtual PC for VS 2005 Pro with SQL Server Express

I am unable to successfully complete an install of Visual Studio 2005 with SQL Server 2005 Express on a Virtual PC 2004 image, which seems to be a pretty reasonable expectation. The installation completes successfully all of the way through in a Windows XP Pro SP2 image, but at the end the installation program informs you that SQL Server Express has failed to install, with no other explanation. No setup log files give any information as to why the installation failed. Then I see in the fine print for SQL Server Express downloads that "There is no support in this release for Virtual Server, Virtual PC". (http://download.microsoft.com/download/c/c/6/cc66b572-a402-4c6a-8233-b9c7d05840c7/RequirementsSQLEXP2005.htm)
Is this indeed the case that we essentially cannot run the full VS 2005 installation in Virtual PC? Is there no workaround for this problem?
Express is certainly supported on Virtual PC and Virtual Server. It's hard to say for sure at this late date but I'm going to blame a bug in VS that was fixed by RTM.

Can't use Virtual PC for VS 2005 Pro with SQL Server Express

I am unable to successfully complete an install of Visual Studio 2005 with SQL Server 2005 Express on a Virtual PC 2004 image, which seems to be a pretty reasonable expectation. The installation completes successfully all of the way through in a Windows XP Pro SP2 image, but at the end the installation program informs you that SQL Server Express has failed to install, with no other explanation. No setup log files give any information as to why the installation failed. Then I see in the fine print for SQL Server Express downloads that "There is no support in this release for Virtual Server, Virtual PC". (http://download.microsoft.com/download/c/c/6/cc66b572-a402-4c6a-8233-b9c7d05840c7/RequirementsSQLEXP2005.htm)
Is this indeed the case that we essentially cannot run the full VS 2005 installation in Virtual PC? Is there no workaround for this problem?
Express is certainly supported on Virtual PC and Virtual Server. It's hard to say for sure at this late date but I'm going to blame a bug in VS that was fixed by RTM.

Sunday, February 12, 2012

Can't use Package Variable to specify the filename for a Connection

I'm attempting to modify a flatfile import package so that I can reuse it to import several other files into the same table. I was unable to use package variables (containing the import filename) in the Flat File Connection Manager file name field. What is the proper way to solve this kind of problem in SSIS?Have you looked up property expressions in BOL? Give that a look.
http://sqljunkies.com/WebLog/knight_reign/archive/2005/02/12/7750.aspx
Thanks,
K|||

I setup a ForEach Loop Container to do this.

Create a Package Variable, for example, "varFileName", for the FileName. Then edit the ForEach Loop container. Select "Variable Mappings". Select the drop-down under the "Variable" column and select your "User: varFileName" variable. The index column should read "0". Save the object. Now add a Data Flow task and double-click to edit.

In the Data Flow window, create a Source Script transformation. Define your output columns on the "Inputs and Outputs" option. Click "Script" and add your variable "varFileName" to the property "ReadOnlyVariables". Now click the "Design Script" button, which opens up another window for scripting.

Add "Imports System.IO" to the top so you can read the flat file.

Read the file with the following code:

Dim strRecord as String
Dim objFlatFile As StreamReader = File.OpenText(Variables.varFileName)
Do Until objFlatFile.Peek = -1
strRecord = objFlatFile.ReadLine
[OutputBuffer].AddRow()
[OutputBuffer].[Column1] = Mid$(stRecord,1,4)
... etc.
Loop

Let me know if this helps...

Can''t update smalldatetime field

I have a table with the field end_date which is defined as a smalldatetime.

I have been unable to update this field using the SqlCommand object.

In my windows form I have a DateTime Picker and I am trying to get it's value into the db with no success.

I have tried

command.Parameters.Add ("@.end_date",SqlDbType.DateTime);

command.Parameters["@.end_date"].Value = dtpEndDate.Value;

I have also tried variations of

command.Parameters.AddWithValue ("@.end_date",dtpEndDate.Value);

Please assist if you can.

although I don't believe this is the best way, but it's working.

command.Parameters.AddWithValue("@.end_date", dtpEndDate.Value.ToShortDateString());

Friday, February 10, 2012

Can't transfer user logins and password from 6.5 to 2000

I tried the upgrade wizard and I am getting this error:
"Unable to connect to the Export Server. Please verify that you are an NT
Administrator on that machine"
I am an NT Administrator on that box.
I also tried the script located
http://groups-beta.google.com/group/microsoft.public.sqlserver.security/browse_thread/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&rnum=10#099a55c7fbed5496
but when I run it, it gives me alot of errors. Can anyone help me with any
suggestions. Thanks.
--
New SQL Server DBA
--
New SQL Server DBAI would just script them out, type in the passwords, and go on down the road
personally. Provided you don't have too many SQL Logins.
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>I tried the upgrade wizard and I am getting this error:
> "Unable to connect to the Export Server. Please verify that you are an NT
> Administrator on that machine"
> I am an NT Administrator on that box.
> I also tried the script located
> http://groups-beta.google.com/group/microsoft.public.sqlserver.security/browse_thread/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&rnum=10#099a55c7fbed5496
> but when I run it, it gives me alot of errors. Can anyone help me with
> any
> suggestions. Thanks.
> --
> New SQL Server DBA
> --
> New SQL Server DBA|||What do you mean by trying in the password, how do I get the passwords since
they are encrypted? Thanks.
"ChrisR" wrote:
> I would just script them out, type in the passwords, and go on down the road
> personally. Provided you don't have too many SQL Logins.
>
> "Newbie" <Newbie@.discussions.microsoft.com> wrote in message
> news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
> >I tried the upgrade wizard and I am getting this error:
> > "Unable to connect to the Export Server. Please verify that you are an NT
> > Administrator on that machine"
> >
> > I am an NT Administrator on that box.
> >
> > I also tried the script located
> > http://groups-beta.google.com/group/microsoft.public.sqlserver.security/browse_thread/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&rnum=10#099a55c7fbed5496
> >
> > but when I run it, it gives me alot of errors. Can anyone help me with
> > any
> > suggestions. Thanks.
> > --
> > New SQL Server DBA
> >
> > --
> > New SQL Server DBA
>
>|||Script them out in encrypted form and use that same encrypted for when creating them in SQL2K (check
out the parameters for sp_addlogin). Also, see if the KB article that has sp_help_revlogin (search
for that word) has something you can use in order to facilitate the scripting of your current
logins.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:72B8DCD1-2758-4CFD-899E-120560CD14BA@.microsoft.com...
> What do you mean by trying in the password, how do I get the passwords since
> they are encrypted? Thanks.
> "ChrisR" wrote:
>> I would just script them out, type in the passwords, and go on down the road
>> personally. Provided you don't have too many SQL Logins.
>>
>> "Newbie" <Newbie@.discussions.microsoft.com> wrote in message
>> news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>> >I tried the upgrade wizard and I am getting this error:
>> > "Unable to connect to the Export Server. Please verify that you are an NT
>> > Administrator on that machine"
>> >
>> > I am an NT Administrator on that box.
>> >
>> > I also tried the script located
>> > http://groups-beta.google.com/group/microsoft.public.sqlserver.security/browse_thread/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&rnum=10#099a55c7fbed5496
>> >
>> > but when I run it, it gives me alot of errors. Can anyone help me with
>> > any
>> > suggestions. Thanks.
>> > --
>> > New SQL Server DBA
>> >
>> > --
>> > New SQL Server DBA
>>

Can't transfer user logins and password from 6.5 to 2000

I tried the upgrade wizard and I am getting this error:
"Unable to connect to the Export Server. Please verify that you are an NT
Administrator on that machine"
I am an NT Administrator on that box.
I also tried the script located
ead/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&rnu
m=10#099a55c7fbed5496" target="_blank">http://groups-beta.google.com/group...99a55c7fbed5496
but when I run it, it gives me alot of errors. Can anyone help me with any
suggestions. Thanks.
--
New SQL Server DBA
New SQL Server DBAI would just script them out, type in the passwords, and go on down the road
personally. Provided you don't have too many SQL Logins.
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>I tried the upgrade wizard and I am getting this error:
> "Unable to connect to the Export Server. Please verify that you are an NT
> Administrator on that machine"
> I am an NT Administrator on that box.
> I also tried the script located
> hread/thread/2eaa09c3d7d7bd1e/099a55c7fbed5496?q=copy+sql+6.5+logins+to+sql+2000&r
num=10#099a55c7fbed5496" target="_blank">http://groups-beta.google.com/group...99a55c7fbed5496
> but when I run it, it gives me alot of errors. Can anyone help me with
> any
> suggestions. Thanks.
> --
> New SQL Server DBA
> --
> New SQL Server DBA|||What do you mean by trying in the password, how do I get the passwords since
they are encrypted? Thanks.
"ChrisR" wrote:

> I would just script them out, type in the passwords, and go on down the ro
ad
> personally. Provided you don't have too many SQL Logins.
>
> "Newbie" <Newbie@.discussions.microsoft.com> wrote in message
> news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>
>|||Script them out in encrypted form and use that same encrypted for when creat
ing them in SQL2K (check
out the parameters for sp_addlogin). Also, see if the KB article that has sp
_help_revlogin (search
for that word) has something you can use in order to facilitate the scriptin
g of your current
logins.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:72B8DCD1-2758-4CFD-899E-120560CD14BA@.microsoft.com...[vbcol=seagreen]
> What do you mean by trying in the password, how do I get the passwords sin
ce
> they are encrypted? Thanks.
> "ChrisR" wrote:
>

Can't transfer user logins and password from 6.5 to 2000

I tried the upgrade wizard and I am getting this error:
"Unable to connect to the Export Server. Please verify that you are an NT
Administrator on that machine"
I am an NT Administrator on that box.
I also tried the script located
http://groups-beta.google.com/group/...9a55c7fbed5496
but when I run it, it gives me alot of errors. Can anyone help me with any
suggestions. Thanks.
New SQL Server DBA
New SQL Server DBA
I would just script them out, type in the passwords, and go on down the road
personally. Provided you don't have too many SQL Logins.
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>I tried the upgrade wizard and I am getting this error:
> "Unable to connect to the Export Server. Please verify that you are an NT
> Administrator on that machine"
> I am an NT Administrator on that box.
> I also tried the script located
> http://groups-beta.google.com/group/...9a55c7fbed5496
> but when I run it, it gives me alot of errors. Can anyone help me with
> any
> suggestions. Thanks.
> --
> New SQL Server DBA
> --
> New SQL Server DBA
|||What do you mean by trying in the password, how do I get the passwords since
they are encrypted? Thanks.
"ChrisR" wrote:

> I would just script them out, type in the passwords, and go on down the road
> personally. Provided you don't have too many SQL Logins.
>
> "Newbie" <Newbie@.discussions.microsoft.com> wrote in message
> news:DA21112C-28CC-482B-851B-129A1761706C@.microsoft.com...
>
>
|||Script them out in encrypted form and use that same encrypted for when creating them in SQL2K (check
out the parameters for sp_addlogin). Also, see if the KB article that has sp_help_revlogin (search
for that word) has something you can use in order to facilitate the scripting of your current
logins.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:72B8DCD1-2758-4CFD-899E-120560CD14BA@.microsoft.com...[vbcol=seagreen]
> What do you mean by trying in the password, how do I get the passwords since
> they are encrypted? Thanks.
> "ChrisR" wrote: