Trust ID PBCEX logo 300x102

Enviornment Variable

9 years 6 days ago
gaston
Senior Boarder
Senior Boarder
Posts: 73
More
Topic Author
Enviornment Variable #1997
We're trying to store the username of the person who printed the card in an SQL column, but nothing seems to be happening when we print a card. What are the exact settings that we need for a storage item?
9 years 6 days ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Enviornment Variable #1998
Hi Gaston,

You can define a storage item on the last page of The edit-data-definition wizard. You have to specify the table, the primary key column and the the field where you want to store the user name. You have to select the option "supply new value for selected column". Once the storage item is defined, you have to go to the Mappings window, select the storage item on the left-hand side and choose the Environment variable mapping. In the mapping properties you can specify that you want to store the Windows user name.

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)
The following user(s) said Thank You Marcel Oosterhof
9 years 6 days ago
gaston
Senior Boarder
Senior Boarder
Posts: 73
More
Topic Author
Enviornment Variable #1999
Hi Rutger,
See my attached settings. I think we have everything correct, but when we print the card and look up the record again, that information is not in the memo_5 field we defined in our SQL table.
Attachments:
9 years 6 days ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Enviornment Variable #2000
Hi Gaston,

The configuration looks OK to me. Is the information not there either after you refresh the data by pressing F5? Do you not see the new data appear in CardExchange or did you check it directly in the database somehow?

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)
9 years 6 days ago
gaston
Senior Boarder
Senior Boarder
Posts: 73
More
Topic Author
Enviornment Variable #2002
It is not there after we refresh. We're only looking in CE.
9 years 6 days ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Enviornment Variable #2003
Hi Gaston,

Can you post the DataExchange.log file from the CardExchange data folder? To see whether there is any trail of CardExchange sending the update command to the database, and any possible error message?

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)
9 years 6 days ago
gaston
Senior Boarder
Senior Boarder
Posts: 73
More
Topic Author
Enviornment Variable #2004
Here is the dataexchange log that was generated for the machine I'm using.


DataExchange command log

-- sql:
SELECT [Student_ID] AS CXID, [Last_Name], [First_Name], [Student_ID]
FROM [Students]
WHERE (LOWER([Student_ID]) LIKE LOWER(@PARAMETER0))
@PARAMETER0 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%
9 years 6 days ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Enviornment Variable #2005
There are no UPDATE commands in this log. Did you print a card before copying the log? A new log is created on every run of CardExchange. Did you disable anything in the print process for the testing?

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)
9 years 6 days ago
gaston
Senior Boarder
Senior Boarder
Posts: 73
More
Topic Author
Enviornment Variable #2006
Here is the log again. Yes, I printed the card twice before I copied this.

DataExchange command log

-- sql:
SELECT [Student_ID] AS CXID, [Last_Name], [First_Name], [Student_ID]
FROM [Students]
WHERE (LOWER([Student_ID]) LIKE LOWER(@PARAMETER0))
@PARAMETER0 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT REPLACE(TABLE_SCHEMA + '.' + TABLE_NAME, 'dbo.', '') FROM INFORMATION_SCHEMA.TABLES

-- sql:
SELECT * FROM [Students]

-- sql:
SELECT [Student_ID] AS CXID, [Last_Name], [First_Name], [Student_ID]
FROM [Students]
WHERE (LOWER([Student_ID]) LIKE LOWER(@PARAMETER0))
@PARAMETER0 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%

-- sql:
SELECT [Student_ID] AS CXID, [Last_Name], [First_Name], [Student_ID]
FROM [Students]
WHERE (LOWER([Student_ID]) LIKE LOWER(@PARAMETER0))
@PARAMETER0 = %9999999%

-- sql:
SELECT *
FROM [Students]
WHERE [Student_ID] = @PARAMETER0
AND ((LOWER([Student_ID]) LIKE LOWER(@PARAMETER1)))
@PARAMETER0 = 9999999
@PARAMETER1 = %9999999%
9 years 6 days ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Enviornment Variable #2007
There is no UPDATE command, but I do not understand why. I need to go out now, so we will have to postpone this until tomorrow. Maybe someone will need to have an online look into it.

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)