Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

Mac 8.5 Client Issue...

Blog:  Sanity Check
Roland Reddekop
Updated 
No Ratings 0     No Comments 0
photo

Great post you shoul...

Blog:  Lotus Nut
Chris Whisonant
Updated 
No Ratings 0     Comments 1
photo

In the never-ending ...

Blog:  Lotus Nut
Chris Whisonant
Updated 
No Ratings 0     No Comments 0
photo

The starting point

Blog:  A day in the ...
Andre Horak
Updated 
No Ratings 0     No Comments 0
photo

Lotus Notes server h...

Blog:  Steve's Lotus...
Steve Medure
Updated 
Ratings 1     Comments 1

Dogear Bookmarks

PayDirt

Blog Authors:  Brett Patterson  

Previous |  Main  | Next

Working with SQL Server

Brett Patterson  |    |  Tags:  sql database connectivity notes  |  Comments (0)
How many of you out there have to write LotusScript  code to access MS SQL Server?  Lucky for me, I get to do it all the time.  Since I'm in a Windows-based environment, I tend to use 'ado' objects to do my connecting.  One of the advantages of using ado is that there are thousands of VB examples of connecting to SQL Server.  So, I started by simply copying and pasting those examples into my LotusScript and viola....Error messages!  But, most of those errors were because I hadn't defined all of those constants that VB uses.  Things like 'adCmdText'.  Well, rather than define those over and over, here's a quick little tip.

Find the file called 'adovbs.inc'  It's usually located in the '\\Program Files\Common Files\System\ado' directory.  Open it with Notepad, copy it, paste it into a new script library and save the library.  (I save mine as adovbs.inc.)  Now, simply "Use" that script library and you never have to worry about defining those VB constants ever again.

If you ever have any other questions about connecting to SQL Server, drop me a line, I'd be happy to help where I can.  Then, you too, can be writing things like "SELECT * FROM Users WHERE clue >0" and get empty result sets.

Have fun!

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.