Author Topic: Accessing a SQL Server database  (Read 7426 times)

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Accessing a SQL Server database
« on: September 28, 2016, 04:02:58 PM »
Hi folks. For the past month, since I purchased voiceattack, I have been like a kid in a candy store. Voiceattack is so much more than a voice activation program for games. So much more than a voice input program on its own. It's more than even a programming language. It's more like an operating system! The way you can organize commands and create your own programs and functions. It is so versatile that when I'm through with it (if that will ever be) I'm looking at this as totally replacing Dragon NaturallySpeaking as an input for windows, but even further than that, I see this as a way to have a computer that you can actually talk to and communicate with without the need for a monitor or keyboard at all. 100% voice applications to do everything we already do with a mouse and Windows. Things like, sending and receiving email, researching things on Google. Printing things and so forth. Voiceattack is more of a platform/OS for voice software.

My background is in basic programming. I learned on the Commodore 64 back in the 80s, and since then, I've used Visual Basic, and have become a great database designer and SQL scripter. Unfortunately, I lack a lot in creating and understanding DLLs. So for this current project I'm working on with voiceattack, I need to find a way to access my MS SQL Server. For 6 years, my job was to write webpages that access SQL databases, so I know how to do the scripting in VB/ASP, but what would be the quickest way for me to pull records from my database from within voiceattack? Is there an existing plug-in that will do this?

Any suggestions?
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: Accessing a SQL Server database
« Reply #1 on: October 01, 2016, 01:32:04 AM »
My background is in basic programming. I learned on the Commodore 64 back in the 80s, and since then, I've used Visual Basic, and have become a great database designer and SQL scripter. Unfortunately, I lack a lot in creating and understanding DLLs. So for this current project I'm working on with voiceattack, I need to find a way to access my MS SQL Server. For 6 years, my job was to write webpages that access SQL databases, so I know how to do the scripting in VB/ASP, but what would be the quickest way for me to pull records from my database from within voiceattack? Is there an existing plug-in that will do this?

Plugins for VoiceAttack can be written in any .NET language, including VB, and that is what i use for mine... there's nothing particularly complicated in building a DLL either: choose your project type as "Class Library", expose one/some public class and off you go; for VoiceAttack specifically, you just need to add the the functions described in the VA help file in a public module, so that they are static ("shared" in VB)

If you want a (still very simple) database example, you can have a look at my VAExtentions plugin, which has support for SQLite databases, but can be easily adapted to any other RDBMS by using the appropriate ADO.NET provider
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: Accessing a SQL Server database
« Reply #2 on: October 06, 2016, 04:35:03 PM »
well, since that last question, I downloaded the most recent version of Visual Studio express and have been learning quite a bit about the new object name spaces and so forth. I took the sample plug-ins projects that came with VA, and built the DLL. However, when I put the DLL in the apps folder, and activate the plug-ins, and restart VA, it doesn't seem to find them.

When I triy to execute a plug-in function, it says that no plug-ins are available. I've spent several hours trying to figure this out. It must be something simple that I'm overlooking.

any ideas?
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Accessing a SQL Server database
« Reply #3 on: October 06, 2016, 05:03:52 PM »
Did you put the .dll in a subfolder?

Quote from: VoiceAttackHelp.pdf
The compiled plugin .dll must reside IN A SUBDIRECTORY of the VoiceAttack Apps directory.

Ex: “C:\Program Files (x86)\VoiceAttack\Apps\myPlugin.dll” will be skipped.

“C:\Program Files (x86)\VoiceAttack\Apps\MyPluginDirectory\myPlugin.dll” will be picked up

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: Accessing a SQL Server database
« Reply #4 on: October 06, 2016, 05:18:54 PM »
Did you put the .dll in a subfolder?

Quote from: VoiceAttackHelp.pdf
The compiled plugin .dll must reside IN A SUBDIRECTORY of the VoiceAttack Apps directory.

Ex: “C:\Program Files (x86)\VoiceAttack\Apps\myPlugin.dll” will be skipped.

“C:\Program Files (x86)\VoiceAttack\Apps\MyPluginDirectory\myPlugin.dll” will be picked up
Ah Ha! I KNEW it was going to be something simple that I was overlooking. Thank you SO much.  oh, and I'll check out your VAExtentions plugin as well. Thanks for the help! :-)
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Accessing a SQL Server database
« Reply #5 on: October 06, 2016, 05:25:34 PM »
I'll check out your VAExtentions plugin as well. Thanks for the help! :-)
I think you've confused Willem Dafoe with John McEnroe, but you're welcome either way.