Hey ...wake up pls to read my post now...now 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
CREATE DATABASE KhmerDictionaryCMB ON
( 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.taskresult=dts.results.failure
return
Endif
Dts.connections(“ KhmerDictionary”).connectionstring= Dts.connections(“ KhmerDictionary”).connectionstring.replace((“Initial Catalog= KhmerDictionary”, (“Initial Catalog=KhmerDictionaryCMB”)
Dts.taskresult=dts.results.Success
End sub
The code above does not response correctly to have the database snapshot connect to VB.net
However ,DTS does not show up in code.
Please held me to resolve this .
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).