Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Big A** Mutan...

42 Entries |  Michael Smelser
Updated 
Ratings 1     Comments 41
photo

TexasSwede

66 Entries |  Karl-Henry Martinsso...
Updated 
No Ratings 0     Comments 59
photo

B's Blog

29 Entries |  Bob Seifert
Updated 
No Ratings 0     Comments 22
photo

Lotus Nut

69 Entries |  Chris Whisonant
Updated 
Ratings 4     Comments 96
photo

FlowerPower

35 Entries |  James T Kork
Updated 
No Ratings 0     Comments 20

Dogear Bookmarks

PayDirt

Blog Authors:  Brett Patterson  

SQL Server with JDBC

Brett Patterson  |    |  Tags:  jdbc databases sql connectivity  |  Comments (0)
 As I said yesterday, I usually do most of my SQL Server connectivity using 'ado' objects.  That works great when you're in a Windows environment.  But what happens when you've got Linux desktops, or servers, or anything other than Windows?  JDBC, that's what.  I suppose you could use the Lotus Connectors, and they probably work just fine.  I just haven't used 'em, and it's my blog so I'm talking about JDBC today.

The first thing you need when looking at using JDBC to connect to SQL Server are the right drivers.  I could go into a long spiel about the different types of JDBC drivers (Type I - Type IV), but plenty of other sites do that far better than I could.  I've played with several different types of drivers, including Microsoft's own.  But, the one I've found that works best for me is the jTDS driver.

So, go download it and over the next couple of posts I'll go through how to get it set up on your Domino server and how to use it to connect to SQL Server, retrieve data, and process it.

Stay tuned...

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!

Vacation's Over...or...Uhg!

Brett Patterson  |    |  Tags:  miscellaneous  |  Comments (0)
 Well, vacation's over.  I'm back in the office.  But, I do have to ask, can time spent with family and in-laws really be counted as "vacation"?  In a sense, I guess it could, because it means I wasn't here.  But, what I really need is some time to let the stress levels in my body subside.  Spending time with family and in-laws doesn't help much there.  OK, at least with my family and my in-laws.  Combine that with the constant barrage of emails from work (curse you RIM and your Blackberries too!) and it's almost like I never even took time off.  However, it all counts as PTO on the timesheet.  Next vacation I take is going to be somewhere with no cellular service and no high-speed access available. 

Happy Pi Day

Brett Patterson  |    |  Tags:  humor math  |  Comments (0)
Having a degree in  mathematics and being a general, all-around geek,  I feel compelled to wish everyone a Happy Pi Day March 14th.

My much needed vacation starts tomorrow!!!


Holy Cow!

Brett Patterson  |    |  Tags:  amazing  |  Comments (0)

I don't think I need to say anything else.

 

http://youtube.com/watch?v=TZSGK5lvYMY

Uhg...

Brett Patterson  |    |  Comments (0)
I hate being sick.  But here I am, fever, aches and pains, cough, headache....ya know how it goes.

I think the worst part is that I am made to feel guilty for wanting to stay home from work and get better.  Anyone else ever given that guilt trip?  I suppose I could just call a bunch of closed door meetings and make 'em all sick.

A Little Teaser

Brett Patterson  |    |  Tags:  lotusscript windows  |  Comments (5)
Retrieve all partition info from any windows server:

 Partition Info:
(A:)  3 1/2 Inch Floppy Drive
(C:)  NTFS  19.99GB (12.56GB Free) 
(D:)  NTFS  39.99GB (5.96GB Free)  Data
(E:)  CD-ROM Disc


This is a function in a script library.  I use a scheduled agent to pull this data daily and write to a notes document.

Sub getPartitionInfo(doc As NotesDocument, strComputer As String)
    Dim strPartition As String
    
    strPartition = ""
    
    On Error Goto errorHandler
    
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2";)
    Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk",,48)
    Forall objItem In colItems
'This shows the different info you can actually query.
        Print "Caption: " & objItem.Caption
        Print "Description: " & objItem.Description
        Print "DeviceID: " & objItem.DeviceID
        Print "DriveType: " & objItem.DriveType
        Print "FileSystem: " & objItem.FileSystem
        Print "FreeSpace: " & objItem.FreeSpace
        Print "Name: " & objItem.Name
        Print "ProviderName: " & objItem.ProviderName
        Print "Size: " & objItem.Size
        Print "VolumeName: " & objItem.VolumeName
'Check if it's a Disk Drive (thus no memory) and just return it's drive letter and description
        If objItem.DriveType = 2 Or objItem.DriveType = 5 Or objItem.DriveType = 4 Then
            strPartition = strPartition + "(" + objItem.DeviceID + ";)  " + objItem.Description + Chr(13)
        Else
'Show drive letter, description, total memory and remaining memory.
            strPartition = strPartition + "(" + objItem.DeviceID + ";)  " + objItem.FileSystem + _
            "  " + Cstr(Round(objItem.Size/1024/1024/1024,2)) + "GB (" Cstr(Round(objItem.FreeSpace/1024/1024/1024,2)) + _
            "GB Free)  " + objItem.VolumeName + Chr(13)
        End If
    End Forall
    doc.PartitionInfo = strPartition
    
    Exit Sub
    
errorHandler:
    Print "Could not access Partition Info.  Error " & Err & ": " & Error$ + " at line " & Erl
    Exit Sub
    
End Sub

Back to the Grind

Brett Patterson  |    |  Tags:  work orlando vacation  |  Comments (0)
Lotusphere is over.  At the end, my family came down to enjoy a few days at Disney World and Sea World.  I don't know which made me more tired, staying up all night and then hitting Lotusphere from 7:30 to 6:00 or trekking the family all around the Magic Kingdom, Epcot, Hollywood Studios, Animal Kingdom and Sea World Or, was it the flight from Orlando to Albuquerque to Vegas to Reno with a 10 year old and a 6 year old on Tuesday and then getting up and getting to work at 7:00 AM?  In all fairness to the kids, they do a pretty good job when it comes to traveling.  My wife told me about how on her trip down to Orlando with the kids when they were de-planing, a man behind her notice the kids and told her he wasn't aware there were even children in front of him and that they could travel with him anytime.  So, I shouldn't be that hard on 'em I guess.

But now, it's back to work.  Somewhere between approving timesheets, PRs, Time-off requests, etc.... and rewriting p-cubed code (again) I'm going to start building the pieces to my composite app demo If you work in a Windows environment and you haven't heard of WMI or Scriptomatic, bone up.  It's going to get fun from here.


Composite Apps

Brett Patterson  |    |  Tags:  composite apps lotusphere  |  Comments (0)
Told you this was going to be about A-Ha moments.  Sitting through some sessions today on Composite Apps, I had just that.  Imagine, if you will, an app for a help desk that would allow the tech, from one location, to see the ticket, info about the person that submitted the ticket, full info about that person's system, the latest error info for the application in question, and even the ability to launch Remote Assistance right from the app.

Let me get 8.0.1 up and going and stay tuned.  Much more to come...

Hitting Paydirt!

Brett Patterson  |    |  Tags:  social networking gaming lotusphere  |  Comments (1)
So, I started a  blog.  I've been building stuff in Notes for going on 12 years and this is the first time I've ever ventured into the Blogosphere.  Why did I do it?  Good question.  I hate to write.  I can never think of anything to enter into these things.  Give me a mic and an audience and I could go on for hours, but writing....yeech!  It took me 3 days just to come up with a title for the blog.  But I'm doing it anyway.  A little encouragement from a few people I've met along the way and an easy way to reach an audience that might care about any of my "a-ha" moments and the pieces have fallen into place. 

I'm in Orlando, FL right now at Lotusphere.  If you're ever gonna have an a-ha moment this is definitely a place that can happen.  But that's not what this first entry is going to be about.  On Monday, while waiting for the General Session, I attended the Salon 2.08.  It was a very interesting and entertaining panel of people up on stage.  Ze Frank was absolutely hilarious.  Golan Levin showed some very interesting stuff.  And Jane McGonigal's "Superpowers" was enlightening.  But a question came up that I just have to throw out for anyone that might actually read this. 

Can something be considered a "social skill" if it's never actually applied in a social setting?

During the Q&A, someone asked about how they could get their kids off of games and back to interacting with real people.  Jane's response was that it wasn't them playing games that was the problem, but, if anything, the kinds of games they play.  The argument being that network games are actually teaching the kids social skills.  Thus, where my question arises from.

That forum was the perfect example.  There we were in a room full of some 400-500(complete estimate, I have no idea how many there actually were.) people.  And, maybe, a half-dozen stood up and asked questions.  How many went and blogged about it?  Just on my way out of the room, I overheard at least 3 different conversations asking questions of each other, but only among groups of people that already knew each other.  Does the anonymity provided by a user name or an avatar create a sense of security that cannot be translated into the real world?  And, if so, is there anything we can do to change that.  Or, are we destined for a world where the only real communication happens right here?



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.