locked
how to use sql server 2012 with microsoft robotics studio vpl? RRS feed

  • Question

  • I have a simple question to ask: how would someone use sql server 2012 to store realtime data that is being transmitted via a bluetooth interface with a robot?...say the boe_bot...????....

    I have googled for several days and have read the 3 most popular books on msrds but no mention of how to persist realtime data aquisition from a robot...say the boe-bot...????...

    Monday, July 2, 2012 4:44 PM

Answers

  • There is no native SQL support in VPL.  I implemented a simple SQL data storage service in C# using the Robotics service template.  If you have either C# Express or Visual Studio installed before you install RDS4, then the Microsoft Robotics template is available.  Starting from the help menu in VPL you can access several tutorials (Contents --> Decentralized Software Services --> DSS Service Tutorials --> C#) that will get you started on creating your own service.  Other than that the database code is pretty standard. 
    Monday, July 2, 2012 8:48 PM
    Moderator

All replies

  • There is no native SQL support in VPL.  I implemented a simple SQL data storage service in C# using the Robotics service template.  If you have either C# Express or Visual Studio installed before you install RDS4, then the Microsoft Robotics template is available.  Starting from the help menu in VPL you can access several tutorials (Contents --> Decentralized Software Services --> DSS Service Tutorials --> C#) that will get you started on creating your own service.  Other than that the database code is pretty standard. 
    Monday, July 2, 2012 8:48 PM
    Moderator
  • Hello there,

    Did you manage to get this working? I'm trying to accomplish the same thing except I already have been coding in C#. I tried to do it using an ADO.NET Entity data model as described by the tutorial on Microsofts website. It doesn't work though it fails to initialize the service and throws the error: 

    System.ArgumentException was unhandled by user codeMessage=The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.Source=System.Data.EntityStackTrace:at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)at RobotDogDSSService.RobotDogEntities..ctor() in C:\Users\Rebecca\Microsoft Robotics Dev Studio 4\RobotDogDSSService\RobotDogDSSService\DBModel.Designer.cs:line 40at RobotDogDSSService.RobotDogDSSService.<Initialize>d__1.MoveNext() in C:\Users\Rebecca\Microsoft Robotics Dev Studio 4\RobotDogDSSService\RobotDogDSSService\RobotDogDSSService.cs:line 352at Microsoft.Ccr.Core.TaskExecutionWorker.MoveIterator(ITask& currentTask, IteratorContext iteratorContext, Handler& finalizer)InnerException:

    I tried looking for answers online and some suggested that this is because the connection string to the database is not accessible by the application. Am I going about this in the wrong way? There aren't any tutorials otherwise on how to accomplish this in a DSS Service.

    Thanks

    Tuesday, July 24, 2012 6:48 AM