Problem With Database Snapshot Connect to VB.NET

db , Cambodia
  • 13 years ago

    Hey ...wake up pls to read my post is 3:47PM

    the microsoft said that we can do database with snapshot but i can't find any sample

    how to  connect database snapshot with VB.NET.

    i try to find alot of site but don't have anybody known about that.

    i create a project by use Database Snapshot is back end bcoz it run wihout SQL Server and VB.NET is front end.

    i have a big problem i want all of programmers to think about that code  as follow

    +Create Database Snapshot Syntax

    ( NAME = KhmerDictionary, FILENAME = 'C:\NimolProject\Dictionary Testing\Original DBDictionary\TrueDBKhmerDictionary\KhmerDictionary.CMB'
    ) AS SNAPSHOT OF KhmerDictionary

    +Connect to database snapshot from VB.NET code

    Imports Microsoft.SqlServer.Dts.Runtime

    Public Sub Main()

    Dim Constr$=Dts.connections(“ KhmerDictionary”).connectionstring

    If not Constr.contain(“Initial Catalog= KhmerDictionary”) then




    Dts.connections( KhmerDictionary”).connectionstring= Dts.connections(“ KhmerDictionary”).connectionstring.replace((“Initial Catalog= KhmerDictionary”, (“Initial Catalog=KhmerDictionaryCMB”)


    End sub


    The code above does not response correctly to have the database snapshot  connect to

    However ,DTS does not show up in code.

    Please held me to resolve this .


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Every language has an optimization operator. In C++ that operator is ‘//’”