Re: VB.Net and SourceSafeTypeLib



What happens when you change this line in your VB .NET code

from: strINI = "X:\\VSSZynxDirectory\\srcsafe.ini"

to: strINI = "X:\VSSZynxDirectory\srcsafe.ini"

"tony webster" <tony webster@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4CA926F4-DD9F-484D-8257-E6D672339BFC@xxxxxxxxxxxxxxxx
>I have downloaded the IVSSLibrary solution from Microsoft. The project that
> actually interacts with the VSS Interop is a C# project, and it has no
> problem opening the VSSDB located on another box.
>
> When I try to run a VB version of the code, I get the following error:
>
> System.Runtime.InteropServices.COMException: The SourceSafe database path
> 'SomeUserName' does not exist. Please select another database.
>
> I am running VS 2003 and VSS 6.0.
>
> C# code:
>
> public string OpenDB(string UserName, string PassWord, string Path)
> {
> VSS_Database = new SourceSafeTypeLib.VSSDatabase();
>
> try
> {
> VSS_Database.Open (Path, UserName, PassWord);
> CurrentPassword = PassWord;
> OpenMethodCount = OpenMethodCount + 1;
> }
> catch(Exception e)
> {
> return e.ToString();
> }
>
> return "";
>
> }
>
>
> VB.Net Code:
>
> Dim objVSSDB As New SourceSafeTypeLib.VSSDatabase
> Dim strUID, strUPW, strINI As String
>
> strINI = "X:\\VSSZynxDirectory\\srcsafe.ini"
> strUID = vssaUIDTxt.Text
> strUPW = vssaUPWTxt.Text
>
> objVSSDB.Open(strINI, strUID, strUPW)
>
> The VB parameter values are exactly equal to the C# values EXCEPT that the
> value of the C# DBPath = @"X:\\VSSZynxDirectory\\srcsafe.ini". The @ is
> added
> by the program.
>
> Otherwise, everthing else is the same, and the VB reference is correct as
> I
> get intellisense for the VSS objects.
>
> Why won't the VB code open the VSS database?
>
> Thanks
>
> Tony
>
>
>
>
>
>


.



Relevant Pages

  • Re: access database field names in Javascript
    ... You need quotes around the string values, and you need to concatenate the ... > I trying to get information from a simple MS Access database named users ... > (username, password and stylesheet). ... > The database connection I'm using and where the SQLstr will be used is: ...
    (microsoft.public.access.formscoding)
  • Re: php inserts into DB
    ... database...the only problem is that it doesn't put anything in the database. ... // checks if the username is in use ... die('Your passwords did not match. ... terminate the string and concatenate the variable, or use sprintf to format the string correctly. ...
    (comp.lang.php)
  • Re: Table comparison
    ... a text box on a hidden form, that gets the username that's logged into the ... database, and what forms they may open up. ... the same GetUserIDthat i use to get the username originally. ... was having it treat this as a string. ...
    (microsoft.public.access.modulesdaovba)
  • Re: FindinFiles accross all file versions
    ... VSS's find in files does not allow searching in history. ... you can take advantage on the file-based structure of the VSS ... Latest version of files in the VSS database are stored in files like ... database and identify the physical file containing the string. ...
    (microsoft.public.vstudio.sourcesafe)
  • passing an Access variable to a page
    ... database and a third piece of information is retrieved. ... string to a webpage so it will obey the rules in the CSS. ... rows consist of the fields username, ...
    (microsoft.public.frontpage.programming)