Friday, March 23, 2012
How To Determine if SP3a installed on client PC?
Service Pack 3a has been installed on a client PC? KB articles such as
321185 do a great job of showing how to use SERVERPROPERTY to determine what
version the SERVER is running, but that's not my question. I need to know if
Service Pack 3a has been installed on a CLIENT, not the SERVER.
Fred wrote:
> How can I tell (preferably by a version attribute on some DLL or EXE)
> that Service Pack 3a has been installed on a client PC? KB articles
> such as 321185 do a great job of showing how to use SERVERPROPERTY to
> determine what version the SERVER is running, but that's not my
> question. I need to know if Service Pack 3a has been installed on a
> CLIENT, not the SERVER.
Run Query Analyzer and go to Help | About. If it's version 760 it's
SP3a.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Is there a programmatic way to determing this? We use CA's SDO tool to push
client software and we need to figure out a way to programmatically test (a
DLL or EXE or registry key entry I assume) to see if SQL Server 2000 Service
Pack 3a is already deployed on a particular client PC.
"David Gugick" wrote:
> Fred wrote:
> Run Query Analyzer and go to Help | About. If it's version 760 it's
> SP3a.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
|||Fred wrote:
> Is there a programmatic way to determing this? We use CA's SDO tool
> to push client software and we need to figure out a way to
> programmatically test (a DLL or EXE or registry key entry I assume)
> to see if SQL Server 2000 Service Pack 3a is already deployed on a
> particular client PC.
>
Can your CA software check the file version of a file? If so, just check
the ISQLW.EXE file against the version you want (2000.80.760.0 for
SP3/SP3a)
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||SELECT @.@.VERSION
Star Fleet Admiral Q @. your Service!
http://www.google.com
Google is your "Friend"
"Fred" <Fred@.discussions.microsoft.com> wrote in message
news:B7E829FB-A6EF-4408-8628-61EFFF8F51D3@.microsoft.com...
> How can I tell (preferably by a version attribute on some DLL or EXE) that
> Service Pack 3a has been installed on a client PC? KB articles such as
> 321185 do a great job of showing how to use SERVERPROPERTY to determine
> what
> version the SERVER is running, but that's not my question. I need to know
> if
> Service Pack 3a has been installed on a CLIENT, not the SERVER.
Sunday, February 19, 2012
How to define multi-valued and composite attribute
I want to implement an address field in a table. But,
this address field is a multi-valued attribute. Also, I want to make it
as a composite field(so that all the info viz, city,st,zip,tel,email
etc can be tied together)
Can anyone tell me how to implement this using T-SQL?I sounds as though you want to store the entire address in a single
table column. You COULD just use a long string, say varchar(255) for
example, but do that and you will never be able to query any of the
individual parts without driving yourself mad in the process. Do you
really want to give up being able to ask for just the addresses in
California? Or just the phone numbers in a specific area code?
The proper way to do this in a database is with multiple columns. One
(two is better) for street address, one for city, one for state, one
for zip, one for phone, one for email. If you need to string them
together that is easy to do when you retrieve them.
Roy Harvey
Beacon Falls, CT
On 3 Mar 2006 10:45:35 -0800, "juventus" <saurabh.kotkar@.gmail.com>
wrote:
>Hello All,
> I want to implement an address field in a table. But,
>this address field is a multi-valued attribute. Also, I want to make it
>as a composite field(so that all the info viz, city,st,zip,tel,email
>etc can be tied together)
>Can anyone tell me how to implement this using T-SQL?
How to define field attribute for a numeric field in SQL table?
Terri|||True... here comes my really problem. My aspx form always does rounding for me while I update the table. If I enter 0.7 it will become 0 in the table. If I enter 2.7 it will become 3 in the table. What is the trick?|||You'll have to show us your code surrounding the SQL command. It's probably in how your data type is set up in your SQLParameter or something along those lines. There's no trick from a SQL perspective -- a command from Query Analyzer would simply look like this:
UPDATE test SET taxRate = '.7' WHERE ID = 10
Terri|||Try Numeric it will make the rounding problem go away in SQL Server, in .NET search MSDN for Strings and Formating in your language. Numeric is bigger than Decimal. Hope this helps.
Kind regards,
Gift Peddie|||This is how I coded...
First is the class
Namespace BusinessLogicLayer
Public Class Itm
...
Private _PST As Decimal
...
Public Property PST() As Decimal
Get
Return _PST
End Get
Set(ByVal Value As Decimal)
_PST = Value
End Set
End Property
...
...
Public Function Insert() As Boolean
ItmID = Convert.ToInt32(SqlHelper.ExecuteScalar(ConfigurationSettings.AppSettings(Web.Global.CfgKeyConnString), "AddItm", CatID, ItmD1, ItmD2, UOM, UPrice, PSTPcnt, GSTPcnt, Note, MasterItem))
Return ItmID > 0
End Function 'Insert
...
End Class
End Namespace
then page load sub...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
...
If txtPSTPcnt.Text = "" Then
txtPSTPcnt.Text = "0.07"
End If
...
End Sub
then when the Save button is clicked
Private Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
...
Itm.PST = CDec(txtPST.Text)
Itm.Insert()
End Sub
Hopefully you have some clue, thx.|||I changed it to numeric and still have the same result.|||Sorry I did not get back to you yesterday, you need code in Custom Numeric Format Strings with using statement from System.globalization. I found some code using the IFormatProvider and ICustomFormatter interfaces on codeproject site. The second link is on MSDN Custom Numeric Format Strings Output Examples table you may have to use DOUBLE datatype in .NET. Hope this helps.
http://www.codeproject.com
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
Kind regards,
Gift Peddie|||Sorry this is the table that show the DOUBLE datatypes human error lol. Hope this helps
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstringsoutputexample.asp
Kind regards,
Gift Peddie|||Thanks a lot. you're very helpful. Since this is my first project on ASP.net and SQL, I can't grap the idea of using the table you refer to. First of all, where do I define "double" and do I put those code in the ASPX.VB? Appreciated.|||The code below should take you closer to what you want, these are part of the .NET Framework Class Library that perform special tasks for you. I don't know books that covers it in VB.NET but in C# the Complete Reference by Herbert Schildt covered it in details in C# not Asp.net. Hope this helps.
NumberFormatInfo.PercentDecimalSeparator Property
[Visual Basic]the effect of changing the PercentDecimalSeparator property.
[Visual Basic]
Imports System
Imports System.Globalization
Class NumberFormatInfoSample
Public Shared Sub Main()
' Gets a NumberFormatInfo associated with the en-US culture.
Dim nfi As NumberFormatInfo = New CultureInfo("en-US", False).NumberFormat
' Displays a value with the default separator (".").
Dim myInt As [Double] = 0.1234
Console.WriteLine(myInt.ToString("P", nfi))
' Displays the same value with a blank as the separator.
nfi.PercentDecimalSeparator = " "
Console.WriteLine(myInt.ToString("P", nfi))
End Sub 'Main
End Class 'NumberFormatInfoSample
'This code produces the following output.
'
'12.34 %
'12 34 %
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationnumberformatinfoclasspercentdecimalseparatortopic.asp
Kind regards,
Gift Peddie|||Again thanks for your advice, but I can't find data type Double in SQL2000. Did I miss something?|||Gentlmen, I found where the problem occured. It's because the SQL parameter wasn't defined properly. Instead of saying
(
@.PST decimal(5,2)
)
I only typed
(
@.PST decimal
)
Anyway I thank anyone participated in the threat.