Showing posts with label hai. Show all posts
Showing posts with label hai. Show all posts

Tuesday, March 27, 2012

Creating Views

Hai Guys,
Can i create a view by joining 2 tables that r on two different database.
Good Day.
Thanks.
Shabuyes, it's possible.|||How do i do this.
I have one server with 2 databases.
my DB server is Sqlserver2000.

Please Help.

Thanks .|||This should probably do it, if you have linked the servers ...

create view NameOfTheView as
select someField, someOtherField
from
ServerName1.DBName.dbo.TableName Server1,
ServerName2.DBName.dbo.TableName Server2,
where
Server1.Field1 = Server2.Field1 and
<insert some other suitable conditions here ...>|||Something like:SELECT s.sysadmin, d.owner
FROM msdb.dbo.sysdtspackages AS d
JOIN master.dbo.syslogins AS s
ON (s.name = d.owner)-PatP|||you need to run sp_addlinkedserver for the remote server
then run sp_addlinkedsrvlogin to create login maps
then invoke the four part name in the query

BOOKS ONLINE{sp_addlinkedserver}
BOOKS ONLINE{sp_addlinkedsrvlogin}
BOOKS ONLINE{Distributed Queries}

this can be done easily in the enterprise manager
SECURITY>LINKED SERVERS

this is kind of the way a partitioned view is created check out federated servers in books online|||you need to run sp_addlinkedserver for the remote server
then run sp_addlinkedsrvlogin to create login mapsDid I miss a meeting somewhere? When did a second server join this discussion?

-PatP|||Did I miss a meeting somewhere? When did a second server join this discussion?

-PatP

whoops
my bad

ignore my pre-post-question post that i had just posted

Wednesday, March 7, 2012

Creating PDF file

Hai

I tried to create pdf file using c#..I find out the way n get the pdf commands like this to display simple text

%PDF-1.1

1 0 obj

<< /Length 2 0 R >>

stream

0 G

1 i 0 J 0 j 1 w 10 M []0 d

0 0 m

0 90 l

S

0 g

90 72.08 72.08 90 50 90 c

27.92 90 10 72.08 10 50 c

10 27.92 27.92 10 50 10 c

72.08 10 90 27.92 90 50 c

BT

/F0 10 Tf

30 798 Td

10 TL

(Sample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample )Tj

(pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf file)'

ET

endstream

endobj

2 0 obj

480

endobj

3 0 obj

<</Type/Page/Parent 4 0 R/Contents 1 0 R>>

endobj

4 0 obj

<</Type /Pages /Count 1

/Kids[

3 0 R

]

/Resources<</ProcSet[/PDF/Text]/Font<</F0 5 0 R>> >>

/MediaBox [ 0 0 594 828 ]

>>

endobj

5 0 obj

<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding/WinAnsiEncoding>>

endobj

6 0 obj

<</Type/Catalog/Pages 4 0 R>>

endobj

xref

0 7

0000000000 65535 f

0000000009 00000 n

0000000541 00000 n

0000000560 00000 n

0000000618 00000 n

0000000754 00000 n

0000000840 00000 n

trailer

<<

/Size 7

/Root 6 0 R

>>

startxref

885

%%EOF

This command is used to display the two line text in one page of pdf..

i need to draw table n show text in tables.how to draw table with format..i cant find pdf commands in net..please provide me ur suggestions...

Regards

Senthil

There should be better forums around to ask about writing PDF code directly.

I have worked on projects where we had to write output as PDF. We used a third party library.

There are some books available on the language.

HTH
-- Leah