Trust ID PBCEX logo 300x102

SQL or Visual Basic Scripts

5 years 9 months ago
cesar sandoval
Fresh Boarder
Fresh Boarder
Posts: 2
More
Topic Author
SQL or Visual Basic Scripts #4386
Hi,

I would like to know if CardExchange would accept SQL scripts to perform data updates every time a card is printed.
Example:

Connection.Open()
Dim command As SqlCommand
command = Connection.CreateCommand()
command.CommandText = "UPDATE LabelSMDataTemplate SET SCANYN=1 Where Job = @JobNo And SleeveNo=@SleeveNo"
command.Parameters.Add(New SqlParameter("@JobNo", JobNo))
command.Parameters.Add(New SqlParameter("@SleeveNo", SleeveNo))
command.ExecuteNonQuery()
Connection.Close()
5 years 9 months ago
Sergio Agostinho
Administrator
Administrator
Posts: 508
More
SQL or Visual Basic Scripts #4390
Hi Cesar,

Yes you can use .Net functions, you need to enabled the advanced mappings in the advanced options dialog and add for example a text filed into your card and define it as script.
When you close the designer and get back into the main interface, select the edit mappings button in the configurations tab and map the previously created text field as .net function, that mapping type will show you the configuration panel to point to your .net file and select the class and function you want to call.

With best regards
Sergio Agostinho
5 years 9 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
SQL or Visual Basic Scripts #4395
Hi Cesar,

Before loosing time on writing scripts, first consider whether you can achieve the same thing with storage items. Ate least the example you give above seems to be standard storage/item functionality that doesn't require any scripting.

regards,
Rutger.

Rutger Koperdraad
Senior Software Engineer

"A reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. All progress, therefore, depends on the unreasonable man." (Bernard Shaw)
×

Notice

The forum is in read only mode.