Saturday, April 2, 2022

Problem with date range and aggregate function

Problem with date range and aggregate function

Good afternoon,

I use aggregate function to calculate measures on period of time. For
example:

Income from 01/01/2006 to 01/15/2006 or income from 01/01/2005 to
12/31/2005

I'va got a time dimension with this hierarchy:
year - quarter - month - week - day

When i used the aggregate function (from 01/01/2006 to 12/31/2006):
AGGREGATE({[EVENEMENT].[Temps
Numérique].&[1].&[2006].&[1].&[1].&[1].&[1]:
[EVENEMENT].[Temps Numérique].&[1].&[2006].&[4].&[12].&[53].&[365]}

I've got my result but when i cross the years, I've null values. For
example from 01/01/2005 to 12/31/2006:

WITH MEMBER [EVENEMENT].[Temps Numérique].[Periode 1] as
(AGGREGATE({[EVENEMENT].[Temps Numérique].&[2005].&[1].&[1].&[1].&[1]:
[EVENEMENT].[Temps Numérique].&[2006].&[4].&[12].&[53].&[365]}))

Could you help me please?

Many to Many relation between tables in Snow Flake schema

I'm not exactly sure wether i should opt for snow flake or not.

Here is the scenario

Product Table holds  various Products with a flag which describes wether the product is a package or Bundle or Product

There are couple of tables which describes what packages should go with in the bundle and what products should go with in the package.

A package can be wrapped in Multiple Bundles and a Bundle can include multiple packages as well as products and a package can include multiple products and the products can be wrapped with in multiple packages.

Customer Orders Scenarios can be as follows

1. Stand Alone Products

2. Stand Alone Package (An Order can Hold Multiple Stand Alone Packages)

3. Bundle (An Order can hold Maximum one Bundle)

3. Package + Stand Alone Products

4. Bundle + Stand Alone Packages

5. Bundle + Stand Alone Products

6. Bundle + Stand Alone Packages + Stand Alone Products.

 

Here is the Order Table schema

Order ID,productid,parentproductid,producttype(Bundle/package),quantity

 

Need to Derive what combination of Bundles,packages,products doing well using MSAS 2000.

Any Ideas abt how to proceed

kk

 

 

 

 

 

 

 

 

 

An existing connection was forcibly closed by the remote host. ; 08S01

Hi,

After reset expired password and applied company password policy, I am getting the following error when I process cude in VS2005:

Error 1 OLE DB error: OLE DB or ODBC error: Communication link failure; 08S01; TCP Provider: An existing connection was forcibly closed by the remote host. ; 08S01; Login failed for user 'Domain\DBServerName$'.; 28000.  0 0

In DB server event log, there is a related entry:

      Event Type: Success Audit
   Event Source: Security
Event Category: Account Management
          Event ID: 697
               Date:  1/31/2006
               Time:  3:51:27 PM
               User:  NT AUTHORITY\SYSTEM
        Computer: DBServerName

Description:
Password Policy Checking API is called:
                                  Caller Username: DBServerName$
                                      Caller Domain: Domain Name
                                    Caller Logon ID: (0x0,0x3E7)
                               Caller Workstation: 127.0.0.1
  Provided User Name (unauthenticated): -
                                       Status Code: 0x0

My development environment is: SQL Server 2005 on WIndows 2003, and I have no problem to connect DB server use windows authentication in Management studio.

It used to work fine. Any help would be greatly appricated.

Thanks

Bill

No TRIM function in 2005 - are you serious!?

I cannot believe that there is yet another version of SQL Server without a TRIM function.  So for SQL 2005 (like I've done in 7.0 and 2000) my T-SQL will look like dog poo because I will have to write LTRIM(RTRIM(MyValue)) anytime I want to remove whitespace from both ends of character values instead of just writing TRIM(MyValue).

Microsoft - how can you write LTRIM and RTRIM and not write TRIM in the same breath and how have you let it go so long without providing it.  This should have been in there since version 4.21.  I mean - how hard is it to add TRIM and just call LTRIM(RTRIM(Value)) under the hood.  Please give us this syntactic sugar in your first service pack for SQL 2005.

Folks - please do not reply with workarounds (i.e. no UDFs or CLR recommendations).  There a several features that MS has neglected to put straight into 2005 (and prior versions for that matter) that must be there.  This is one of them.

Reply:

Well thanks for that "no sh*t" solution ace.  Of course I trim data before it makes it to the database - FOR APPLICATIONS WHERE I HAVE CONTROL OF WRITING THE DATA ACCESS LAYER MYSELF!  But in this big ol' world of systems development you sometimes run into some "crazy" situations like third party apps and nightly DTS packages where someone left some dirt in the code and forgot to trim values.  Can you believe I have even had to contatenate a couple of character strings together in T-SQL (i.e. names) for things like data transfer objects and reports and had to trim things up a bit while chaining those strings together.  But maybe you haven't run into one of these "crazy" situations where a built in TRIM function would be handy.

Of course I could write my own TRIM function, but I guess I'm just holding out for Microsoft to give me TRIM in T-SQL since they have given it to me in EVERY ONE OF THEIR OTHER LANGUAGES!  I guess I would expect that during a MS code review a development manager might see LTRIM and RTRIM and say "hmmm... why don't we also give 'em TRIM to knock that whitespace off the front and the back at the same time with only 4 characters and a set of parens."  Are you telling me that you wouldn't like to have TRIM too?

There were only 2 options when posting - question and comment.  I looked for rant and it wasn't there so I chose comment instead.  I could have sent my rant to sqlwish (as I have before), but then again I could also have sent it to suggestionswelcome@thatbrickwalloverthere.com and gotten the same response.

Instead what I think I'll do is just post the whole "LTRIM, RTRIM but no TRIM" debacle to The Daily WTF since this is truly what it is.


------------------------------------
Reply:

How can you dare to say "bothering people here... ".
BAnVA is asking very important and correctly stated question.
If you have no answer, just don't interfere!



------------------------------------
Reply:
I have to agree, having TRIM seems obvious when you have LTRIM and RTRIM.  That's like having the notion of a front door and a back door, but no notion of a door in general.  Anyway, VARCHAR is not necessarily the answer either.  I've encountered situations where a value from a CHAR datatype is loaded into a VARCHAR datatype via DTS and the trailing spaces remain even though it's in a VARCHAR datatype.  This was SQL2k, so maybe that's not an issue in SQL 2005. 

------------------------------------
Reply:

How is he trolling? Do you know what trolling is? Really you're just a pedant. It's easy to minimize someone else's frustration with simple solutions and sarcasm like "...sheer agony of typing LTRIM(RTRIM()) instead of TRIM()".

Ultimately yes you're right it's not *that* big of a deal, but he raises a good point. Plus when you throw in other functions and you're dealing with a lot of parenthesis...


------------------------------------
Reply:

Yes there should be a TRIM function. What a Joke.

"NNTP User" sounds like a communist.


------------------------------------
Reply:
"Why don't you create your own function called TRIM()?"

This is a good advice for those who play with home computers.
   Now imagine your code suppose to be executed on dozens databases and different servers. So if you are not the person responsible for data model you should notify DBAs and/or smbody else that you want to create this function, even such a simple one. It's possible but I hope MS could do it for us.

------------------------------------
Reply:
Well I don't know if SQL2k5 does anything about it but making a cutom function just isn't the same since you ahve to preface it with the username that the function belongs to.

It is a minor issue of course but I would agree that it is a major gripe.

I myself ask the same question of why not provide the function  that would be sooooo easy to include.

------------------------------------
Reply:

Brick wall is an understatement. So what if the issue is minor? So is the fix, but they didn't do it. It is definitely annoying. Code readability is reduced. If there was no need for trim INSIDE T-sql, then why do we even have LTRIM and RTRIM?

This is what trolling is:
"NNTP from Microsoft, in an effort to eradicate untrimmed white spaces, officially advises all customers to stop using computers and to hand-write from now on. In a related matter NNTP pronounced that dog poo is now mandatory!"

 Mazz2000 wrote:
"NNTP User" sounds like a communist.
Even the commies had "Glasnost" in the end. A public forum is exactly the place and the way to voice a reaction to a missing feature. If enough people chime in it will get eventually included. 

The issue is not trim() any more. This is a perfect example of a decaying and stagnant culture at MS, pervaded by the likes of NNTP. That is something to get worked up about.


------------------------------------
Reply:

I hope you are all finished with your yellings, at the end there is a solution that I posted some time ago:

http://groups.google.de/group/microsoft.public.sqlserver.programming/browse_frm/thread/78a5a709904a5f9d

HTH, Jens Suessmeyer.


------------------------------------
Reply:
Well, thank you for showing us how to implement TRIM function, but that's not the issue here. Any decent programmer will know how to implement a TRIM function, just like he'll know how to implement AVG, SUM etc.

Like Carl M. wrote, the issue is readability, especially when reading someone else's  code. Obviously it's much easier to read  TRIM(x) than LTRIM(RTRIM(x)) or something like SomeonesSuperFunction(x, ' '). Add a complex outer statement, and it becomes obvious why people are asking for TRIM.

P


------------------------------------
Reply:

I agree

 

How can SSRS has a TRIM function and SQL Server does not

I'd take TRIM over LTRIM or RTRIM anyday Smile

 

Let's hope SQL 2008 Katami will have it, PLEASE?


------------------------------------
Reply:

I agree too. This makes absolutely no sense. Microsoft alsways had the image of being inconsequent. But this is the best i've ever seen. So, dear microsoft, could you tell me why the hell SSRS has TRIM and the DB module does not??? Where is the missing logic? What makes you believe that the users of SSRS might want to use this function when they can also have LTRIM and RTRIM?

 

Greets so far


------------------------------------
Reply:

SQLWish@microsoft.com has been deprecated.

 

Use the following to offer product suggestions.

 

Suggestions for SQL Server

http://connect.microsoft.com/sqlserver


------------------------------------

Interop.ADOMD

Can anyone tell me what application or SDK installs Interop.ADOMD and any dependencies?

Thanks. - Wendell G

 

Licensing issue ?, OWC10.PivotTableClass(); The specified module could not be found

 

Hello,

I had this problem for a while and wonder if its a licensing issue.
I have read about licensing on MSDN but could not get a clear understanding.

Here's my scenario:

I have SQL Server 2000 with Analysis Services and several OLAP cubes.
My ASP.Net 1.1 C# web site offers a web page with access to
those OLAP cubes through OWC 10.

Using the XMLData property I was able to let the user save their own queries.

On the intranet users have Office XP installed.
For users that don't have the OWC I needed to offer links to download them
and an HTML version of the data.

So I put an option on the querystring to emulate users without OWC so I can test.
In the code, I use this code to generate a static view of the data:

 OWC10.PivotTable oPT = new OWC10.PivotTableClass();

 oPT.XMLData = sXML;

 response.write( oPT.HTMLData );

it works on my intranet server but not on the internet server.
I got this error on the first line:

 The specified module could not be found.

the internet server doesn't have SQL Server but only Analysis Services installed.
The cubes are archived and restored from the intranet server.

From the intranet, I am able to view pivot table play around with them and
emulate non-owc users where I have an HTML table with the data.

From the internet, if I have OWC, I can do the same as intranet but the
minute I try to use the OWC10.PivotTableClass() class, I got this error.

Is this a licensing issue or do I miss something ??
It is getting kind of urgent... ;-)

Thanks for any help, please excuse my english it is not my first language.
Claude

Look up a single value

We have a table that stores the tax rate with rate effective and expiration dates. This rate changes every year, but is applicable to all records that are in the fact table.

 

The cube stores three rolling years of data. Is there a way to look up the tax rate for the given year, instead of storing it as a measure in the cube?

Thanks

 

zoya

Currency Conversions - Revisited

This is a follow up on my post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=222768&SiteID=1

I ditched the currency wizard because i could get it to work with my data.

Im doing general ledger reporting where multiple currencies need to be reported in two reporting currencies: Actual daily exchange rate, and financial exchange rate.

My table setup for this is as following:

  • "Time" table with a granularity of day (10 years of day members, around 37000 rows)
  • "Currency" table with all currencies including the two reporting currencies (30 rows)
  • "General ledger accounts" table with all accounts (1000 rows)
  • "General Ledger Entry" fact table with a reference to "Currency" which specifies wich currency the posting was made in. Here is also my measure "Value" (16 million rows)
  • "Currency Rates" Fact tables with two foreign key relationships to "currency": Currency_from and Currency_to. Currency_to are the "normal" currencies such as USD, EUR and so forth. Currency_From are my reporting currencies REP_A and REP_B. The fact table also has a relationship with time at daily granularity. This table gives the exchange rates between my reporting currencies and the currencies the transactions are posted in. The rates are given as: 1 USD = x REP_A. (28 * 2 * 37000  = 2'072'000 rows).

This results in the following dimensions and facts  in my cube:

  • Time (Dim)
  • Currency (Dim)
  • GL Account (Dim)
  • Currency Rates (Fact)
  • Entry Amount (Fact)
  • Reporting Currency (From named query: Select key_currency, code FROM currency WHERE code in ('REP_A', 'REP_B') UNION SELECT NULL AS key_currency, 'Local' AS Code)

My dimension usage is set up like:

Dimension CURRENCY

Regular relationship with Currency Rates fact joined on currency_to (ie EUR, USD etc)

Regular relationship with Entry Amount fact joined with currency_key

Dimension TIME

Regular relationship with Currency Rates

Regular realtionship with Entry Amount

Dimension Reporting Currency

Regular  relationship with Currency Rates fact joined on currency_from (ie. REP_A, REP_B)

Dimension GL Account

Regular relationship with  Entry Amount fact

 

My calculations look like:

scope ([Measures].[Entry Amount]);

// LOCAL

scope([Reporting Currency].[Reporting Currency].&[0]);

this = [measures].[Entry Amount];

end scope;

//REPORTING CURRENCIES

scope([Reporting Currency].[Reporting Currency].&[12499], Leaves([Time]), Leaves([Currency]));

this = [measures].[Entry Amount] * [Measures].[Rate];

end scope;

scope([Reporting Currency].[Reporting Currency].&[12500], Leaves([Time]), Leaves([Currency]));

this = [measures].[Entry Amount] * [Measures].[Rate];

end scope;

end scope;

 

This appears to give me the correct values (anyone correct me on this) BUT: this is extremely slow. When i drill down into the account hierarchy with this it takes around 5 minutes to expand a limited number of submembers (in the 2-10 range).

Does anyone have any tips for me on this?

 

SSIS Won't Start - XP Pro WMI Error

I have an install of SQL Server 2005 Developer Edition, and the Integration Services Service will not start.  If I attempt to start the service via the Services Computer Management screen, the system throws a message that says the service started, then stopped.

If I attempt to start the service via the SQL Server Configuration Manager, I get a "service did not respond in a timely fashion", which is so unfashionable.

Of particular interest is that during the install I did get an error message about WMI security.  Looking at the WMI Security tab in WMI Control, I noticed that the key that the setup program was trying to configure did not exist under "ServerEvents".

There is a key named "MSSQLSERVER", but that did not match the key that the setup program was complaining about. 

I am not seeing any event log items relating to errors.  The system log shows the service startup and service shutdown as information items.

Anyone have any ideas?

 

 

 


Reply:
I had a similar problem when I migrated from Sept CTP to RTM due to a corrupt WMI Repository. 

If you have XP Pro, you could try the following command on a command prompt.
rundll32 wbemupgd, UpgradeRepository

If that doesn't work you can try the following (this is what resolved my issue).
net stop winmgmt
Delete/Rename
%windir%\System32\Wbem\Repository
net start winmgmt

Larry Pope

------------------------------------
Reply:

I tried both, and the error message changed so that I cannot run SQL Server Management.  I tried a "reinstall" from the add-remove programs dialog and got a "Machine does not meet requirements". 

Gosh I wish it would tell me what the machine failed specifically.  Guess I can find it in the install logs...

Anyway, long story short, I did a full remove of SQL Server 2005.  I have not reinstalled yet.  It's beginning to feel like the deinstallation of this fine product is the solution that I may wind up implementing.

I will work on it more tonight, I have already spent about 3 hours looking at it.


------------------------------------
Reply:

Machine does not meet requirements

usually indicates that you tried to install the server version on a non-server box. Make sure to install the dev version on XP Pro.


------------------------------------

Pivot currency problem when aggregating on time

Hi!

I'm using the currency conversion (using the BI wizard - having SEK as pivot currency, many-to-many option, going through division (organizational dimension) to find the currency to use to convert to pivot from local currencies SEK and DKK, and then having reporting currencies CHF, USD, DKK and SEK). Everything works fine when I'm at time_key level (lowest level - which is month). However - when I choose a quarter the pivot currency (SEK) is multiplied by three which is wrong.

In my exchange rates I have currency conversion from SEK to all currencies for all time_keys (including a SEK to SEK where the rate is set to 1). For testing purposes I created a test currency called SWE which was set up exactly the same as SEK (in dim_currency and fact_exchangerate) and used this as a reporting currency. This currency SWE ended up being right, but I still had a SEK currency (pivot) that was wrong. So I'd like to get some advice on either getting the Pivot currency correct when aggregating on time OR hiding the pivot currency.

Br,

Henrik

Clustering Analysis Services with SQL Server 2000 Cluster Environment

Has anybody managed to successfully deploy a fail over cluster of Analysis Services?

Our "experts" are having a few problems.  We are using DSO to deploy the cubes to the environments that we have however since following the steps in the Microsoft knowledge base on how to cluster analysis services the DSO command for MDStore.AddNew doesn't work at all, therefore I don't think the installation is correct.

Any information would be greatfully recieved.  IF you have attempted this and failed it would also be good to know your thoughts.

Regards

Moved the post "SSIS Package Configurations Stored in SQL Server Table "

Please look for the post in the SQL Server Integrated Services forum.

DISTINCT COUNT in Standard Edition

 

Urgent Question:

If I create a DISTINCT COUNT measure in my cube, then it automatically creates a new measure group and a new partition.

I've created the cube OK on my machine, running Developer Edition, but will it move to the customer's server which has Standard Edition installed - and which does not support partitions according to the features list.

We've just built the server, and the cubes don't restore. I can get rid of the perspectives, at a pinch, but not the Distinct Count.  Help!

Richard

 

SQL Express Beta components problem

For those of you facing with the problem of incompatible beta components installed error when trying to install SQL server Express Editon here is the solution that I found:

After many frustating days, remove of all my programs and editing the registry with no success I finally found the link bellow with helped me to solve this issued faced by so many people.

Go to the link bellow and install the clean  up tool, run it and then install the framework 2.0

Hope this will help all of you facing this problem!

http://lab.msdn.microsoft.com/express/readme/

Regards,

adasilva

Can't Deploy AdventureWorks in Analysis Services

Hi All,

We attempted to reload the Adventure Works DW in Analysis Services 2005 after a previous install. We first dropped and uninstalled the sample OLTP databases, then removed the previous install using the add/remove programs tool. We then installed the samples again using the AdventureWorks Data Warehouse Database and Analysis Services Project, attached the two databases to the database engine, and then attempted to deploy the Adventure Works. sln project using the Business Intelligence Development Studio. We encountered the following error when we processed the AdventureWorks DW Standard Edition database in Analysis Services:

Error 1 OLE DB error: OLE DB or ODBC error: Communication link failure; 08S01; Shared Memory Provider: The system cannot open the file. ; 08S01; Login failed for user 'NT AUTHORITY\SYSTEM'.; 28000; Cannot open database requested in login 'AdventureWorksDW'. Login fails.; 42000.  0 0

Please note that we used the configuration manager to enable named pipes and allow remote connections. We also, renamed the target server (to the named server instance instead of the localhost), disabled any Windows and Norton firewalls, and changed the deployment server edition to the Evaluation version in the Adventure Works DW Property page.

Nothing seems to work. Any help would be greatly appreciated!

Thanks,

Brad

merged cells...the bain of my existence

the translation from report manager to excel is horrible.

calculations aggregating also Hidden Members

Hi everybody,

I'm trying to apply a calculation to a cube, in the Standard Edition.

Dimension "Mesi" has got hidden members, which I don't want to see in my reports, but that should be aggregated.

If I use the following code to aggregate the "first" member across the "Mesi" dimension (a Time dimension), the "Descendants...item(0)" function applies only to the visible items, whilst it should apply also to the hidden members (I mean that the item(0) could be also a hidden member and it should be considered). I have the same problem also using the OpeningPeriod function.

I don't understand the reason of this behaviour, in fact if use the Enterprise Edition and apply the "First" Aggregate Function to measure "Valore", it takes into consideration also the Hidden members (the dimension is the same, and all the cube, too).

I need to make it work on the Standard Edition and it is necessary to involve Hidden Members, can you help me?

Thank you very much.

Vania

 

SCOPE

(

[Measures].[Valore],

[Mesi].[GerSemTrim].[Trimestre].MEMBERS

)

This=Descendants([Mesi].[GerSemTrim].CurrentMember,

[Mesi].[GerSemTrim].[MeseConPrimi11Mesi],SELF).item(0)

END SCOPE

Data Design Question

I work for an ASP where we have many customers data stored in the same OLTP database.  We are building an OLAP database to support BI features, and have seperated each customer's data into its own database and cube. 

We could have put all customers data together in one database and cube, and had the customer be a dimension on it. 

Which method is better?  Is there a difference from a performance perspective?

Thanks

Rich

Use SQL Server Mobile on your Desktop (create/use Sql Server Mobile databases on your desktop)

After a little bit of search, I succeeded! Here are the guidelines for using an SQL server mobile dataset residing in your desktop computer on your desktop (populating a SQL Server mobile database on your desktop). At the end of the guidelines, I give a sample program to populate an sqlce database from a text file.

I hope you will find these guidelines and sample program usefull.

You may contact me at toncu@nospam.e-kolay.net (remove nospam for actual address)

(You should have VS2005 and Sql Server 2005 installed on your desktop computer)

1. create a Windowsapplication project
    File->New Project
    Choose Windows in Project Types and Windows Apllication from Templates

2. Insert a reference to SQL Server Mobile
    Project->Add Reference->Browse
    c:\Program Files\Microsoft Visual Studio 8
       \Common7\IDE\System.Data.SqlServerCE.DLL

3. Insert
    imports system.data.sqlserverce
at the top of your form file

4. Write your application just as you would  as if your project was a Smartdeviceapplication.

i.e. use sqlconnection and other constructs.


A sample application is as follows:
(dbtableexist is a subroutine which shows how to process the SCHEMA.
In this subroutine, change TABLES to INDEXES and TABLE_NAME to INDEX_NAME to search for an index)

Imports system.data.SqlServerCe
Imports System.IO
    Public Sub createaccessfile(ByVal a$)
        'curdbpath is the path of the database e.g. d:\my sql databases\
        Dim connStr As String = "Data Source = " & curdbpath & a$ & ".sdf"
        Dim conn As SqlCeConnection = Nothing
        Dim command As SqlCeCommand
        Try
            conn = New SqlCeConnection(connStr)
            conn.Open()
            command = conn.CreateCommand()
            If dbtableexist(conn, "ACCESSFILE") Then
                command.CommandText = "DROP TABLE ACCESSFILE"
                command.ExecuteNonQuery()
            End If
            command.CommandText = "CREATE TABLE ACCESSFILE ( code nchar(20),field nchar(3),totalrecs  nvarchar(255),indexbits ntext)"
            command.ExecuteNonQuery()
            command.CommandText = "CREATE INDEX codeindex on ACCESSFILE (field,code)"
            command.ExecuteNonQuery()
        Catch ex As SqlCeException
            Dim m1 = ex.Message
            Dim m2 = ex.Source
            Dim m3 = ex.NativeError
            MsgBox(m1 & m2 & m3, , "open " & a$ & " for accessfile creation")
            Exit Sub
        End Try

        ' Create and prepare a SQL statement.
        command.CommandText = " insert into accessfile values (?,?,?,?);"

        ' Read and insert the lines from the file until the end
        ' of the file is reached.
        Dim accfname As String = curdbpath & a$ & "_accessfile.inp"
        Dim fs As FileStream = New FileStream(accfname, FileMode.Open)
        Dim sr As New StreamReader(fs)
        Dim line As String, codestr As String, fieldstr As String, totalrecsstr As String, indexbitsstr As String
        Dim line1 As String, flagstr As String, field As Integer

        line = sr.ReadLine : line1 = line
        Dim currec As Integer = 0
        ' Note: Even though named parameterized queries are not supported, we still need
        '       to provide unique parameter names so that we can manipulate parameter collection;
        command.Parameters.Add("@code", "a")
        command.Parameters.Add("@field", 1)
        command.Parameters.Add("@totrecs", "c")
        command.Parameters.Add("@indexbits", "d")
        Do
            currec = currec + 1
            If currec Mod 10 = 0 Then dispcaption(Str(currec))
            flagstr = before(line, Chr(9)) : line = after(line, Chr(9))
            codestr = before(line, Chr(9)) : line = after(line, Chr(9))
            field = Val(before(line, Chr(9))) : line = after(line, Chr(9))
            totalrecsstr = before(line, Chr(9)) : line = after(line, Chr(9))
            indexbitsstr = line
            Try
                command.Parameters(0).Value = codestr
                command.Parameters(1).Value = Format(field, "000")
                command.Parameters(2).Value = totalrecsstr
                command.Parameters(3).Value = indexbitsstr
                ' Calling Prepare after having set the Commandtext and parameters.
                command.Prepare()
                command.ExecuteNonQuery()
            Catch ex As SqlCeException
                Dim m1 = ex.Message
                Dim m2 = ex.Source
                Dim m3 = ex.NativeError
                MsgBox(m1 & m2 & m3, , "Add record to Acessfile")
                conn.Close()
                sr.Close()
                Exit Sub
            End Try
            line = sr.ReadLine : line1 = line
        Loop Until line Is Nothing
        sr.Close()
        conn.Close()
    End Sub
    Private Function dbtableexist(ByVal dbconnection As SqlCeConnection, ByVal tablename As String) As Boolean
        Dim cmd As SqlCeCommand, rdr As SqlCeDataReader
        Dim iname As String, tablename1 As String, i As Integer
        tablename1 = UCase(tablename)
        cmd = dbconnection.CreateCommand
        cmd.CommandType = CommandType.Text
        cmd.CommandText = "select * from INFORMATION_SCHEMA.INDEXES"
        Try
            rdr = cmd.ExecuteReader
        Catch ex As SqlCeException
            Dim m1 = ex.Message
            Dim m2 = ex.Source
            Dim m3 = ex.NativeError
            MsgBox(m1 & m2 & m3)
            Stop
        End Try
        Do While rdr.Read
            iname = rdr("TABLE_NAME")
            If UCase(iname) = tablename1 Then dbtableexist = True : Exit Function
        Loop
        dbtableexist = False
    End Function

SQL Server 2005 Books Online download republished

Due to reports that some people were getting an older version of the SQL Server 2005 Books Online download, we have republished the download with a new file name.

The previous file name was "SqlServer2K5_BOL.msi" and the new one is "SqlServer2K5_BOL_Dec2005.msi". Nothing is different in the contents of the package; the only difference is the file name of the wrapper .msi.

Having the download with the new file name should adress the following issues:

  • Some people receiving the older, November version due to caching issues with the same path and file name.
  • Clearly identify the new package as an update from the previous package.

The location on the Microsoft Download Center has remained the same:

http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en

Tai Yee
SQL Server documentation team

No comments:

Post a Comment

Setup is Split Across Multiple CDs

Setup is Split Across Multiple CDs Lately I've seen a bunch of people hitting installation errors that have to do with the fact th...