1. Mariano Recuero
  2. PowerBuilder
  3. Monday, 19 November 2018 09:49 AM UTC

Hi,
Powerbuilder 12.6
Windows 7 x64
SCC: Microsoft Visual SafeSource

im trying to work with PBOrca126.dll directly from my PB app.
Basically i just want to make a small app for making a lot of global replace in code.
I can connect to Orca and make changes.
Problems are with SCC:
When i try to connect to SCC it says an error message that :
19/11/2018 09:59 Source Management Initialization...
Unable to Read Registry Value: SOFTWARE\SourceCodeControlProvider\InstalledSCCProviders\푴Ԇ

Any idea?

(I dont know why appears a chinesse character)

I'd like to know too, how can i check out and check in objects from PBOrca126 when i change code, i dont see any function about it.

What is procedure for that then?

Thanks in advance.

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 14:43 PM UTC
  2. PowerBuilder
  3. # Permalink

The ORCA functions for CheckOut & CheckIn only work for PB4-PB7.

My PBOrcapi ORCA interface tool also comes with a source control API to allow for performing SCC functions from PowerBuilder.

Comment
There are no comments made yet.
Mariano Recuero Accepted Answer Pending Moderation
  1. Friday, 30 November 2018 11:15 AM UTC
  2. PowerBuilder
  3. # 1

Finally i've bought PbOrcapi from Roland.

 

Thanks in advance.

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 15:52 PM UTC
  2. PowerBuilder
  3. # 2

You could use the SSC command line to get the objects you want to change below is an extract from the help file:

Using the VSS Command Line

See Also

You can use the VSS command line to run batch files and macros. In addition, you can use the command line to perform all VSS Explorer commands.

Carrying Out Commands on the Command Line

You can start a command shell from Windows 95 or Windows NT and type VSS commands from there. To do this, the VSS folder must be on your path (set with the PATH environment variable).

You can also use the Run command on the Windows Start menu to run a specific command. For example, you can type ss Get *.* to get all files in the current project.

Command-Line Syntax

Command-line commands have the following general syntax:

ss command [one or more items] [one or more options]

What an item is depends on the command. For instance, for the Get command, an item is a VSS file or project; for the Add command, an item is an operating system file.

In almost all cases where you can specify an item to act on, you can specify more than one item. For instance, any of the following are valid ways of executing the Get command:

ss Get HELLO.C
ss Get HELLO.C HELLO.H TEST.H makefile
ss Get *.C *.H makefile linkfile
ss Get *.*

The command line is case-insensitive, that is, the command ss Get HELLO.C can also be typed as ss get Hello.c.

Note   You do not have to type an entire command name for the VSS command line to recognize it; you need only type enough of the name for VSS to be able to distinguish it from every other command. In most cases, typing the first two or three characters is sufficient.

Command-Line Options

In addition to the command and the items, you can specify options, or parameters. Options are preceded by a hyphen and modify the command. A few options are specific to a command, and are described in that command's command-line Help topic. There is also a set of general options applicable to many commands. They are described in the following table.

Option Description
-C Use one (or no) comment for all specified items. (The Dir command uses this option in a different way.)
-O Redirect or paginate the output of the command.
-V Operate on a specific version of an item.
-R Perform a command recursively.
-S Turn SmartMode on or off for the command.
-G Change the way the Get command works on any file retrieved to the local drive.
-W Indicate whether local copies are read-only.
-N Change between long and short file name mode.
-I- Ignore: Do not ask for input under any circumstances.
-Y Specify username and password.
-?, -H Request online Help with a command: The -H command-line option obtains the same result.

 

Use quotation marks around the entire parameter whenever an item or option contains the space character as part of a string of text. For example, use "-CThis is the comment" rather than -C"This is the comment". Otherwise, VSS treats the space as a separator between different parameters, and the command either fails or yields unexpected results.

Comment
There are no comments made yet.
Mariano Recuero Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 15:33 PM UTC
  2. PowerBuilder
  3. # 3

Thanks for your reply.

From command line i can connect.

But i need Search and replace funcionality.

 

Comment
  1. David Peace (Powersoft)
  2. Friday, 30 November 2018 16:58 PM UTC
Once you have your the source file out of SSC, you can perform the find and replace. We have in the past written a PB program to read the source files and do this, or if you have access to linux you can use vi on all the files.



Lots of ways to do that job once you have your source text files.
  1. Helpful
There are no comments made yet.
Mariano Recuero Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 15:32 PM UTC
  2. PowerBuilder
  3. # 4

Hi roland,

i've been testing your Tool PBSearch and it's great but i need to make a lot of changes and i dont want to do it manually.

I've made a little modification in Global Replace from PBTools (basically i add a lot rows of texts for replacing from a file configurated in a specified way). It works fine, changes are made in objects. Problem is project is under SCC and im not able to connect to SCC, and i dont know if i could connect to SCC someday how to set objects checkout and change code. PBORCA_CompileEntryImport change code and set object to checkout?

Ideal for me would be a mix between my modified PBTools (managing all changes to do) and PBSearch (managing changes with SCC):

Thanks in advance

Comment
  1. Roland Smith
  2. Tuesday, 20 November 2018 18:10 PM UTC
I don't think you can code to the SCC API directly from PowerBuilder. If you wanted to try calling functions of your providers scc dll, the documentation is at https://docs.microsoft.com/en-us/visualstudio/extensibility/source-control-plug-in-api-functions?view=vs-2017. The SCC API is Ansi only so you'll need to remember that if you try it.



I developed a dll in C that PBSearch uses to check-out objects. I am giving it to anyone who purchases my PBOrcapi ORCA interface.

http://www.topwizprogramming.com/pborcapi.html

  1. Helpful
  1. Mariano Recuero
  2. Wednesday, 21 November 2018 07:47 AM UTC
Thanks a lot, Roland.

Im gonna ask my employer for getting your software.



  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 14:40 PM UTC
  2. PowerBuilder
  3. # 5

PBSearch has a Global Search and Replace that will automatcially perform a checkout of all changed objects.

http://www.topwizprogramming.com/pbsearch.html

 

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 20 November 2018 14:45 PM UTC
I was going to mention that too Roland, but got side tracked with the whole MS SourceSafe question. Thanks.
  1. Helpful
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 14:33 PM UTC
  2. PowerBuilder
  3. # 6

Hi

We use MS Visual Source Safe and perform SSC operations from PB as part of our automatic complier routine. We use the SSC command line options to invoke the operations we need. You could try the same.

just for info the registry (under Wow6432Node) contains the following under InstalledSCCProviders:

The Chinese characters imply some corruption or Unicode issue, I know it's a stupid question, but can you perform the operations that you are trying to do manually on the same machine using the SSC Gui?

What do you have in the registry under that key?

Failing that, sample code that you are using would help.

Regards

David

Comment
  1. Roland Smith
  2. Tuesday, 20 November 2018 14:46 PM UTC
The value in 'Data' points you to another location in the registry where information about the source control provider is found. That information includes the dll file that implements the SCC API.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.