Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Beginning Microsoft SQL Server 2008 ... - S3 Tech Training Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Appendix A: System Functions Text and Image Functions The text and image functions perform operations on text or image data. They are: ❑ PATINDEX (This was covered in the “String Functions” section earlier in the appendix.) ❑ TEXTPTR ❑ TEXTVALID TEXTPTR The TEXTPTR function checks the value of the text pointer that corresponds to a text, ntext, or image column and returns a varbinary value. The text pointer should be checked to ensure that it points to the first text page before running READTEXT, WRITETEXT, and UPDATE statements. The syntax is as follows: TEXTPTR() TEXTVALID 648 The TEXTVALID function checks whether a specified text pointer is valid. The syntax is as follows: TEXTVALID(‘’, ) The table.column parameter specifies the name of the table and column to be used. The text_ptr parameter specifies the text pointer to be checked. This function will return 0 if the pointer is invalid and 1 if the pointer is valid.
B Very Simple Connectivity Examples Entire books are written around the subject of connectivity. For the first several books I put out, I deliberately avoided the topic entirely in the basic belief that it is a simply huge topic — one that is difficult to do justice to in less than a full book. That said, having a SQL Server but not allowing programs to connect to it is the same as not having a SQL Server at all. Sure, we may log into Management Studio and write queries directly, but the reality is that the vast majority of our users out there never actually see the database directly. For this “Beginning” title, I’m still going to touch on the subject only in a very limited fashion that is purely meant for quick reference once you’ve looked at other sources, or perhaps to give you an inkling of what is involved. If you’re serious about displaying excellence in working with SQL Server or any other connectivity-based data solution, I highly recommend you purchase a book specifically on data access and connectivity. This appendix is a collection of extremely simple connectivity examples utilizing a couple of client languages and a few features in two different connectivity models. We’re going to stick a few basic examples of connecting within each language/model mix and leave the discussion of the whys and hows to books that are focused solely on connectivity. I can’t stress enough how these examples are truly the basics. You can make many, many choices and optimizations for connectivity. Each connectivity model has its own quirks, and different languages sometimes bring their own flair. If you’re trying to get more out of this than just a basic feel for how it’s done (or perhaps an “Oh yeah, I forgot that part”), check out the connectivity coverage I offer in Professional SQL Server 2008 Programming or perhaps another connectivity-specific book. (There are likely entire books just for your particular language and connectivity model mix.) Connectivity models covered here include: ❑ ADO.NET ❑ ADO
- Page 636 and 637: Appendix A: System Functions @@REMS
- Page 638 and 639: Appendix A: System Functions Cert_I
- Page 640 and 641: Appendix A: System Functions Encryp
- Page 642 and 643: Appendix A: System Functions @@FETC
- Page 644 and 645: Appendix A: System Functions CURREN
- Page 646 and 647: Appendix A: System Functions SYSDAT
- Page 648 and 649: Appendix A: System Functions GetRoo
- Page 650 and 651: Appendix A: System Functions The ex
- Page 652 and 653: Appendix A: System Functions RAND T
- Page 654 and 655: Appendix A: System Functions ❑ IN
- Page 656 and 657: Appendix A: System Functions ❑ Is
- Page 658 and 659: Appendix A: System Functions FILEGR
- Page 660 and 661: Appendix A: System Functions INDEX_
- Page 662 and 663: IsCheckCnst IsConstraint IsDefault
- Page 664 and 665: Appendix A: System Functions OBJECT
- Page 666 and 667: Appendix A: System Functions TYPEPR
- Page 668 and 669: Appendix A: System Functions The qu
- Page 670 and 671: Appendix A: System Functions The SU
- Page 672 and 673: Appendix A: System Functions ASCII
- Page 674 and 675: Appendix A: System Functions The ch
- Page 676 and 677: Appendix A: System Functions UNICOD
- Page 678 and 679: Appendix A: System Functions CAST a
- Page 680 and 681: Appendix A: System Functions HOST_I
- Page 682 and 683: Appendix A: System Functions NULLIF
- Page 684 and 685: Appendix A: System Functions 646 Pr
- Page 688 and 689: Appendix B: Very Simple Connectivit
- Page 690 and 691: Appendix B: Very Simple Connectivit
- Page 692 and 693: Appendix B: Very Simple Connectivit
- Page 694 and 695: Appendix B: Very Simple Connectivit
- Page 696 and 697: ABS function A ABS function, 611 AC
- Page 698 and 699: closing tags closing tags, XML docu
- Page 700 and 701: cryptographic functions (continued)
- Page 702 and 703: defects defects. See well formed XM
- Page 704 and 705: EXPLICIT option EXPLICIT option bas
- Page 706 and 707: IGNORE_DUP_KEY option (CREATE INDEX
- Page 708 and 709: LOWER function LOWER function, 635
- Page 710 and 711: online transaction-processing (OLTP
- Page 712 and 713: query results query results alphabe
- Page 714 and 715: scripts (continued) creating with M
- Page 716 and 717: state state, basics of, 391 stateme
- Page 718 and 719: transactions (continued) COMMIT TRA
- Page 720: View Builder View Builder (Manageme
B<br />
Very Simple<br />
Connectivity Examples<br />
Entire books are written around the subject of connectivity. For the first several books I put out, I<br />
deliberately avoided the topic entirely in the basic belief that it is a simply huge topic — one that is<br />
difficult to do justice to in less than a full book. That said, having a <strong>SQL</strong> <strong>Server</strong> but not allowing<br />
programs to connect to it is the same as not having a <strong>SQL</strong> <strong>Server</strong> at all. Sure, we may log into<br />
Management Studio and write queries directly, but the reality is that the vast majority of our users<br />
out there never actually see the database directly.<br />
For this “<strong>Beginning</strong>” title, I’m still going to touch on the subject only in a very limited fashion that<br />
is purely meant for quick reference once you’ve looked at other sources, or perhaps to give you an<br />
inkling of what is involved. If you’re serious about displaying excellence in working with <strong>SQL</strong><br />
<strong>Server</strong> or any other connectivity-based data solution, I highly recommend you purchase a book<br />
specifically on data access and connectivity.<br />
This appendix is a collection of extremely simple connectivity examples utilizing a couple of client<br />
languages and a few features in two different connectivity models. We’re going to stick a few basic<br />
examples of connecting within each language/model mix and leave the discussion of the whys<br />
and hows to books that are focused solely on connectivity.<br />
I can’t stress enough how these examples are truly the basics. You can make many, many choices and<br />
optimizations for connectivity. Each connectivity model has its own quirks, and different languages<br />
sometimes bring their own flair. If you’re trying to get more out of this than just a basic feel for how<br />
it’s done (or perhaps an “Oh yeah, I forgot that part”), check out the connectivity coverage I offer<br />
in Professional <strong>SQL</strong> <strong>Server</strong> <strong>2008</strong> Programming or perhaps another connectivity-specific book.<br />
(There are likely entire books just for your particular language and connectivity model mix.)<br />
Connectivity models covered here include:<br />
❑ ADO.NET<br />
❑ ADO