Showing posts with label version. Show all posts
Showing posts with label version. Show all posts

Wednesday, March 28, 2012

Opening SQL Server Express files with SQL Server Management Studio (2005)

I am trying to open a SS2005 Express file with the full version of SQL Server Management Studio but it will not let me. I cannot install SQL Server Express Management Studio as they cannot co-exist on the same machine!

I can open the file in Visual Studio but itb will not allow me to change table names or move tables etc to another SQL Express database.

Is there an addin tool that will allow me to work on these files with SQL 2005 Studio or any other tool that will allow me to change table names and move tables/data between SQL Express files?

You cannot open database files in Management Studio.

You have to attach the database to your SQL Express in order to connect to it with Management Studio.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

i think what you are refering is User Instance feature of SQL Server Express. This feature is only available in Express edition. So you may change the connection string which connecting to otherversion.

attach the mdf and ldf file using sp_attach_db and then you can view the database in Management Studio

Madhu

Friday, March 23, 2012

OPENDATASOURCE: text file as input ?

Version 2000.
How do I do something like the example

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended
properties=Excel 5.0')...xactions

but use a .txt-file instead ?

I tried building it using Access (that usually works :-) ) and that gives a
connectionstring of:
Text;DSN=Link
Sammenkdningsspecifikation;FMT=Delimited;HDR=NO;I MEX=2;CharacterSet=850;DAT
ABASE=c:\temp
Sourcetablename=link.txt

but I can't seem to "massage" it into working on the sql-server.

If I quick and dirty swap 'Microsoft.Jet.OLEDB.4.0' with 'Text' it gives
error:
Could not locate registry entry for OLE DB provider 'Text'.

tia
/jim"Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
news:40bf26a4$0$3050$14726298@.news.sunsite.dk...
> Version 2000.
> How do I do something like the example
> SELECT *
> FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended
> properties=Excel 5.0')...xactions
> but use a .txt-file instead ?
> I tried building it using Access (that usually works :-) ) and that gives
a
> connectionstring of:
> Text;DSN=Link
Sammenkdningsspecifikation;FMT=Delimited;HDR=NO;I MEX=2;CharacterSet=850;DAT
> ABASE=c:\temp
> Sourcetablename=link.txt
> but I can't seem to "massage" it into working on the sql-server.
> If I quick and dirty swap 'Microsoft.Jet.OLEDB.4.0' with 'Text' it gives
> error:
> Could not locate registry entry for OLE DB provider 'Text'.
> tia
> /jim

These articles might be helpful - you need a schema.ini file in addition to
the DSN:

http://www.users.drew.edu/skass/sql/TextDriver.htm
http://support.microsoft.com/defaul...kb;EN-US;149090

Simon|||Simon Hayes wrote:
> "Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
> news:40bf26a4$0$3050$14726298@.news.sunsite.dk...
>> Version 2000.
>> How do I do something like the example
>>
>> SELECT *
>> FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
>> 'Data Source="c:\Finance\account.xls";User
>> ID=Admin;Password=;Extended properties=Excel 5.0')...xactions
>>
>> but use a .txt-file instead ?

> These articles might be helpful - you need a schema.ini file in
> addition to the DSN:
> http://www.users.drew.edu/skass/sql/TextDriver.htm
> http://support.microsoft.com/defaul...kb;EN-US;149090

Thx Simon, the links were very helpful.

Here is the solution:

File c:\temp\link.txt
10248;"Vins et alcools Chevalier";7/4/1996 0:00:00
10249;"Toms Spezialitten";7/5/1996 0:00:00
10250;"Hanari Carnes";7/8/1996 0:00:00

File c:\temp\schema.ini
[link.txt]
Format=Delimited(;)
CharacterSet=OEM
ColNameHeader=False
Col1=CustomerNumber Long
Col2=CustomerName Text Width 40
Col3=EntryDate Datetime

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\temp";Extended properties=Text')...table1#txt

And a link about schema.ini
http://msdn.microsoft.com/library/d...ma_ini_file.asp

But... I can't get it to work with
Format=Delimited(,)
or
Format=CSVDelimited
and
File c:\temp\link.txt
10248,"Vins et alcools Chevalier",7/4/1996 0:00:00
10249,"Toms Spezialitten",7/5/1996 0:00:00
10250,"Hanari Carnes",7/8/1996 0:00:00

or a ";" instead of a ","

But never mind....
/jima|||<snip
> Thx Simon, the links were very helpful.
> Here is the solution:
> File c:\temp\link.txt
> 10248;"Vins et alcools Chevalier";7/4/1996 0:00:00
> 10249;"Toms Spezialitten";7/5/1996 0:00:00
> 10250;"Hanari Carnes";7/8/1996 0:00:00
> File c:\temp\schema.ini
> [link.txt]
> Format=Delimited(;)
> CharacterSet=OEM
> ColNameHeader=False
> Col1=CustomerNumber Long
> Col2=CustomerName Text Width 40
> Col3=EntryDate Datetime
> SELECT *
> FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source="c:\temp";Extended properties=Text')...table1#txt
> And a link about schema.ini
http://msdn.microsoft.com/library/d...ma_ini_file.asp
> But... I can't get it to work with
> Format=Delimited(,)
> or
> Format=CSVDelimited
> and
> File c:\temp\link.txt
> 10248,"Vins et alcools Chevalier",7/4/1996 0:00:00
> 10249,"Toms Spezialitten",7/5/1996 0:00:00
> 10250,"Hanari Carnes",7/8/1996 0:00:00
> or a ";" instead of a ","
> But never mind....
> /jima

Format=CSVDelimited seems to work fine for me, using your sample above:

[test.txt]
Format=CSVDelimited
CharacterSet=OEM
ColNameHeader=False
Col1=CustomerNumber Long
Col2=CustomerName Text Width 40
Col3=EntryDate Datetime

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source=c:\scripts;Extended properties=Text')...test#txt

What error message do you get?

Simon|||>> But... I can't get it to work with
>> Format=Delimited(,)
>> or
>> Format=CSVDelimited
>> and
>> File c:\temp\link.txt
>> 10248,"Vins et alcools Chevalier",7/4/1996 0:00:00
>> 10249,"Toms Spezialitten",7/5/1996 0:00:00
>> 10250,"Hanari Carnes",7/8/1996 0:00:00
>>
>> or a ";" instead of a ","

> Format=CSVDelimited seems to work fine for me, using your sample
> above:
> [test.txt]
> Format=CSVDelimited
> CharacterSet=OEM
> ColNameHeader=False
> Col1=CustomerNumber Long
> Col2=CustomerName Text Width 40
> Col3=EntryDate Datetime
> SELECT *
> FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source=c:\scripts;Extended properties=Text')...test#txt
> What error message do you get?

Hmmm, today it behaves a little different :-) I was sure it gave me a "ole
db error. the provider didnt return any information about what went wrong."
but today it gives me

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Tekstfilspecifikationens feltseparator er
magen til decimalseparatoren eller tekstafgrnseren.]
Which means "The textfile's fieldseparator is the same as the
decimalseparator or the textdelimiter."

But now I can get it to work with ";" and Format=Delimited(;)

thx again,

/jim

Tuesday, March 20, 2012

Open report in new window: window.open method gives error

Hi,

I am using SSRS Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00. I want to open linked report in new window.

I tried whats mentioned in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=240172&SiteID=1 but i get an error on Window.Open method.

How do I solve the problem?

Thanks

to display a linked report in a new window, right-click on the text box containing the link text and go to 'properties', then the navigation tab. In the 'jump to URL' field enter the full path to linked report on the report server as follows:

http://<servername>/ReportServer/Pages/ReportViewer.aspx?%2f<parent folder>%2f<name of linked report>&rs:Command=Render

you will need to change the text between the <angle brackets> to suit your network etc. This opens the linked report in a new window (works for me anyway:)
Notice that the URL above is slightly different to the usual URL that displays in the report server address bar - this version hides most of the report server window from the user, so they only see the report itself and its parameters (if any) - quite useful IMHO

Open report in new window: window.open method gives error

Hi,

I am using SSRS Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00. I want to open linked report in new window.

I tried whats mentioned in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=240172&SiteID=1 but i get an error on Window.Open method.

How do I solve the problem?

Thanks

to display a linked report in a new window, right-click on the text box containing the link text and go to 'properties', then the navigation tab. In the 'jump to URL' field enter the full path to linked report on the report server as follows:

http://<servername>/ReportServer/Pages/ReportViewer.aspx?%2f<parent folder>%2f<name of linked report>&rs:Command=Render

you will need to change the text between the <angle brackets> to suit your network etc. This opens the linked report in a new window (works for me anyway:)
Notice that the URL above is slightly different to the usual URL that displays in the report server address bar - this version hides most of the report server window from the user, so they only see the report itself and its parameters (if any) - quite useful IMHO