I assume you mean a 3rd party SQL database? You'll need to create an add-in to do this.
Yes, I want to write in a 3rd party SQL DB.
The problem is that I still learn VB and would be a great help if someone can send me (or write here) an example of VB code of how read the properties of the datacard and how write in a SQL database. I know about how create and add-in, I only need some example of the VB code for do the function. With this "base code" I will can write the rest of it.
1) Can somedy write me an VB example, that I can modify and execute douring de aprovat flow.
2) For other side, it's possibe to use a task for update datacard information reading an other SQL database (update cost prices?, I know how doing thisone but only went I change manualy datacard propieties and I need a task for update without checkout the file
If you are reading or writing to an external database you are looking at buying a 3rd party application or writing one yourself. (With the exception of reading simple card list information.)
This could be done with a button click as PigeonHole does: http://www.youtube.com/watch?v=bHY_5DhfY5I
or a task could certainly do this too. (If you choose the task route, I would make your cost a versionless variable.)
You are requesting a great deal of code. In fact, you are requesting a "project" and it may be better to pay a consultant to assist you.
Do you have the EPDM API help? If you do not have it, look in the EPDM installation disk in the "\Support\API\" folder for a file named "API_GB.chm". Use that API help file to guide you through getting data from datacard variables.
The "GetVar" function is what you need after getting the variable interface using "IEdmEnumeratorVariable8"
Private Sub EnterNewAuthor(ByVal pFile As IEdmFile5)
On Error GoTo ErrHand
'Make sure that the file is checked out
If Not pFile.IsLocked Then
MsgBox("The file must be checked out.")
'Obtain the variable interface
Dim pEnumVar As IEdmEnumeratorVariable8
pEnumVar = pFile.GetEnumeratorVariable
'Get the current value of the Author variable
Dim sAuthor As String
Dim oAuthor As Object
If pEnumVar.GetVar("Author", "", oAuthor) Then sAuthor = oAuthor
'Let the user enter a new value
Dim sMsg As String sMsg = "The current author of " + pFile.Name + " is '" + sAuthor + "'."
sMsg = sMsg + vbLf + "Please enter a new one:"
sAuthor = InputBox(sMsg)
'Update the variable value
pEnumVar.SetVar("Author", "", sAuthor)
'Flush the value to the file and close the file.
Dim sEname As String
Dim sDesc As String
pFile.Vault.GetErrorString(Err.Number, sEname, sDesc)
MsgBox(sEname + vbLf + sDesc)
As far as writing to a different SQL database, my recommendation is to use Microsoft's technet to help you learn how to connect to another SQL database, see if the necessary tables exist, if not create them, write new rows to the table, and close the connection properly.
There are several threads on this forum in the API section that can help you.
Good luck on your journey.
Thanks for you recomendations but we are a very small factory and we can't spend more money (it's hard for us to pay SW and EPDM apps and I had to buy EPDM without VAT implementation and I implemented it using the EPDM Administration guide) and I would like to try to doing myself this connector, learning VB and the EPDM API Guide.
I will still try to learn more, for submit you more concrete questions.
Does training come out of a different budget? Perhaps you could go to a EPDM API class...
The budget comes from the same "site" (it's a familiar factory) and the grands/help in Spain are very difficult to obtain in this moment (I learn VB and EPDM API during weekends using some examples that I can found in the forum and the "API fundamentals of SW EPDM" book/manual)