Friday, May 18, 2012
Friday, March 16, 2012
Tuesday, January 10, 2012
Code: AV000
Message: APPROVED
Description: Successful communication attempt.
Code: AV400
Message: OPERATOR LOGIN FAILED
Description: Login credentials are wrong.
Code: AV401
Message: MAXIMUM ALLOWABLE LOGIN ATTEMPTS EXCEEDED
Description: Account is locked due to exceeded failed attempts. Account must be unlocked by Advam administrator.
Code: AV166
Message: STORED PAN ID IS REQUIRED
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Message: APPROVED
Description: Successful communication attempt.
Code: AV400
Message: OPERATOR LOGIN FAILED
Description: Login credentials are wrong.
Code: AV401
Message: MAXIMUM ALLOWABLE LOGIN ATTEMPTS EXCEEDED
Description: Account is locked due to exceeded failed attempts. Account must be unlocked by Advam administrator.
Code: AV166
Message: STORED PAN ID IS REQUIRED
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Code:
Message:
Description:
Wednesday, August 31, 2011
When integrating with Chase Payemtech E-Xact Pay-Pages, I could not get the HMAC-MD5 hash to generate properly and match what their Hash Generator was producing. After reading up on HMAC (http://en.wikipedia.org/wiki/HMAC)
I ran some of their samples and found that what was being generated from the HMAC-MD5 was the same result as HMAC SHA1 and NOT what the wiki said should be produced for HMAC-MD5.
Solution? change the Pay-Page configuration to use SHA1 and use SHA1 to generate all the request and response validation hashes.
x_fp_hash
I ran some of their samples and found that what was being generated from the HMAC-MD5 was the same result as HMAC SHA1 and NOT what the wiki said should be produced for HMAC-MD5.
Solution? change the Pay-Page configuration to use SHA1 and use SHA1 to generate all the request and response validation hashes.
x_fp_hash
Tuesday, August 30, 2011
Wednesday, June 08, 2011
Collection of IF EXISTS statements for SQL
IF EXISTS (SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Aparc_SpaceSensorHistory' AND COLUMN_NAME = 'RecordedOn')
IF EXISTS (SELECT * FROM sys.foreign_keys
WHERE object_id = OBJECT_ID(N'[dbo].[FK_Aparc_ParkingSpace_Aparc_ParkingSpace]') AND parent_object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingSpace]'))
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingSpace]') AND type in (N'U'))
SELECT * FROM sys.constraints
ALTER TABLE dbo.Aparc_SpaceSensorHistory
DROP CONSTRAINT DF_Aparc_SpaceSensorHistory_RecordedOn
END
ALTER TABLE dbo.Aparc_SpaceSensorHistory ADD
RecordDate datetime NOT NULL CONSTRAINT DF_Aparc_SpaceSensorHistory_RecordDate DEFAULT getdate()
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CorrectSpaceNumber]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[CorrectSpaceNumber]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlateHistory]') AND name = N'IX_Aparc_ParkingPlateHistory')
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlateHistory]') AND name = N'PK__Aparc_ParkingSpace')
if not exists (select name from sys.objects where type_desc = 'DEFAULT_CONSTRAINT' and name = 'DF_AID_AGENCY_STAFF_CSR')
IF EXISTS(SELECT * FROM SYS.OBJECTS WHERE type_desc = 'DEFAULT_CONSTRAINT' AND parent_object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlate]' and name = 'DF_AID_AGENCY_STAFF_CSR'))
IF EXISTS (SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Aparc_SpaceSensorHistory' AND COLUMN_NAME = 'RecordedOn')
IF EXISTS (SELECT * FROM sys.foreign_keys
WHERE object_id = OBJECT_ID(N'[dbo].[FK_Aparc_ParkingSpace_Aparc_ParkingSpace]') AND parent_object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingSpace]'))
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingSpace]') AND type in (N'U'))
SELECT * FROM sys.constraints
ALTER TABLE dbo.Aparc_SpaceSensorHistory
DROP CONSTRAINT DF_Aparc_SpaceSensorHistory_RecordedOn
END
ALTER TABLE dbo.Aparc_SpaceSensorHistory ADD
RecordDate datetime NOT NULL CONSTRAINT DF_Aparc_SpaceSensorHistory_RecordDate DEFAULT getdate()
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CorrectSpaceNumber]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[CorrectSpaceNumber]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlateHistory]') AND name = N'IX_Aparc_ParkingPlateHistory')
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlateHistory]') AND name = N'PK__Aparc_ParkingSpace')
if not exists (select name from sys.objects where type_desc = 'DEFAULT_CONSTRAINT' and name = 'DF_AID_AGENCY_STAFF_CSR')
IF EXISTS(SELECT * FROM SYS.OBJECTS WHERE type_desc = 'DEFAULT_CONSTRAINT' AND parent_object_id = OBJECT_ID(N'[dbo].[Aparc_ParkingPlate]' and name = 'DF_AID_AGENCY_STAFF_CSR'))
Tuesday, April 19, 2011
Tuesday, April 12, 2011
I was getting a System.ObjectDisposedException when trying to serialize/remote a LINQ result set via a webservice. The actual data result was fine. The problem lay with the parent and child relationships generated by LINQ. Looping through each result and setting all the relationship objects to null stopped the exception, but that was not a solution (merely identified the source of the issue). The solution (provided to me by co-worker: Robert Blasutig), is to prevent LINQ from trying to load parent and child relationships automatically.
This is done by setting the DeferredLoadingEnabled property of the context to false.
To then have LINQ load parent/child objects later, you must specify which relationships to load with the following:
using (ClientDBDataContext clientCtx = new ClientDBDataContext(clientDbConnStr))
{
clientCtx.DeferredLoadingEnabled = false;
DataLoadOptions loadOptions = new DataLoadOptions();
loadOptions.LoadWith(dtAlias => dtAlias.ParentChildTableName);
clientCtx.LoadOptions = loadOptions;
...query...
}
FULL EXCEPTION:
System.InvalidOperationException: There was an error generating the XML document. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DataContext accessed after Dispose.'.
at System.Data.Linq.DataContext.GetTable(Type type)
at System.Data.Linq.CommonDataServices.GetDataMemberQuery(MetaDataMember member, Expression[] keyValues)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.ExecuteKeyQuery(Object[] keyValues)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.Execute(Object instance)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.DeferredSource.GetEnumerator()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Data.Linq.EntityRef`1.get_Entity()
at AparcSystems.AparcDataAccess.Aparc_PdmTariff.get_Aparc_EnfArea()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write25_Aparc_PdmTariff(String n, String ns, Aparc_PdmTariff o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write57_ArrayOfAparc_PdmTariff(Object o)
at Microsoft.Xml.Serialization.GeneratedAssembly.ListOfAparc_PdmTariffSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
at System.Web.Services.Protocols.XmlReturnWriter.Write(HttpResponse response, Stream outputStream, Object returnValue)
at System.Web.Services.Protocols.HttpServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream)
at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
This is done by setting the DeferredLoadingEnabled property of the context to false.
To then have LINQ load parent/child objects later, you must specify which relationships to load with the following:
using (ClientDBDataContext clientCtx = new ClientDBDataContext(clientDbConnStr))
{
clientCtx.DeferredLoadingEnabled = false;
DataLoadOptions loadOptions = new DataLoadOptions();
loadOptions.LoadWith
clientCtx.LoadOptions = loadOptions;
...query...
}
FULL EXCEPTION:
System.InvalidOperationException: There was an error generating the XML document. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DataContext accessed after Dispose.'.
at System.Data.Linq.DataContext.GetTable(Type type)
at System.Data.Linq.CommonDataServices.GetDataMemberQuery(MetaDataMember member, Expression[] keyValues)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.ExecuteKeyQuery(Object[] keyValues)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.Execute(Object instance)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.DeferredSource.GetEnumerator()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Data.Linq.EntityRef`1.get_Entity()
at AparcSystems.AparcDataAccess.Aparc_PdmTariff.get_Aparc_EnfArea()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write25_Aparc_PdmTariff(String n, String ns, Aparc_PdmTariff o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write57_ArrayOfAparc_PdmTariff(Object o)
at Microsoft.Xml.Serialization.GeneratedAssembly.ListOfAparc_PdmTariffSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
at System.Web.Services.Protocols.XmlReturnWriter.Write(HttpResponse response, Stream outputStream, Object returnValue)
at System.Web.Services.Protocols.HttpServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream)
at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
Monday, April 11, 2011
Monday, January 17, 2011
Thursday, December 02, 2010
Monday, November 15, 2010
How to check open connections to a Progress database:
proenv>e:
nav to DB file dir
proenv>cd progress\databases\customerDB
proenv>promon databaseName
use Promon instructions to view various statuses of the db and users
1. User Control
2. Locking and Waiting Statistics
3. Block Access
4. Record Locking Table
5. Activity
6. Shared Resources
7. Database Status
8. Shut Down Database
ETC...
proenv>e:
nav to DB file dir
proenv>cd progress\databases\customerDB
proenv>promon databaseName
use Promon instructions to view various statuses of the db and users
1. User Control
2. Locking and Waiting Statistics
3. Block Access
4. Record Locking Table
5. Activity
6. Shared Resources
7. Database Status
8. Shut Down Database
ETC...
Saturday, November 13, 2010
Wednesday, November 10, 2010
Tuesday, August 24, 2010
Monday, August 23, 2010
How to manually add a Progress OpenEdge ODBC Driver
ALERT: This requires registry edits, so take your normal precautions.
Launch:
regedit.exe
Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI
Add/Create the following key:
ALERT: This requires registry edits, so take your normal precautions.
Launch:
regedit.exe
Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI
Add/Create the following key:
Progress OpenEdge [XX.XN] Driver
Where [XX.XN] is your available version of the Progress bin. (e.g. 10.2C)
Open the Progress OpenEdge XX.XN Driver key and add the following strings (REG_SZ):
APILevel = "1"
ConnectFunctions = "YYN"
CPTimeout = "60"
DriverODBCVer = "3.50"
FileUsage = "0"
SQLLevel = "0"
UsageCount = "1"
Setup = "[PATH]\pgoe1023.dll"
Driver = "[PATH]\pgoe1023.dll"
Where [PATH] is the location of the "pgoe1023.dll" library (e.g. "C:\Progress\V102A\bin").
HINT: You may place the bin file(s+) anywhere on the local system.
HINT: You may place the bin file(s+) anywhere on the local system.
Next, Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers
Add the following string (REG_SZ):
Progress OpenEdge [XX.XN] Driver = "Installed"
Where [XX.XN] is your available version of the Progress bin. (e.g. 10.2C)
You will now see the Progress OE ODBC driver available in the ODBC Manager (SysWoW64 version for Windows 7).
connection string sample:
<add name="ProgressDb" connectionString="DRIVER=Progress OpenEdge 10.2A driver;HOST=localhost;PORT=9999;DB=databaseName;UID=userId;PWD=password;" />
connection string sample:
<add name="ProgressDb" connectionString="DRIVER=Progress OpenEdge 10.2A driver;HOST=localhost;PORT=9999;DB=databaseName;UID=userId;PWD=password;" />
How to manually add a Progress OpenEdge ODBC Driver
Launch regedit.exe
Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI
Add/Create the following key:
Launch regedit.exe
Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI
Add/Create the following key:
Progress OpenEdge [XX.XN] Driver
Where [XX.XN] is your available version of the Progress bin. (e.g. 10.2C)
Open the Progress OpenEdge XX.XN Driver key and add the following strings (REG_SZ):
APILevel = "1"
ConnectFunctions = "YYN"
CPTimeout = "60"
DriverODBCVer = "3.50"
FileUsage = "0"
SQLLevel = "0"
UsageCount = "1"
Setup = "[PATH]\pgoe1023.dll"
Driver = "[PATH]\pgoe1023.dll"
Where [PATH] is the location of the "pgoe1023.dll" library (e.g. "C:\Progress\V102A\bin"). You may place this file anywhere on the local system.
Next, Navigate to:
(Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
(64bit Windows 7)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers
Add the following string (REG_SZ):
Progress OpenEdge [XX.XN] Driver = "Installed"
Where [XX.XN] is your available version of the Progress bin. (e.g. 10.2C)
You will now see the Progress OE ODBC driver available in the ODBC Manager (SysWoW64 version for Windows 7).
Wednesday, August 18, 2010
ODBC Driver Issue: Progress OpenEdge - error code 193
You are trying to create a 64bit ODBC connection using a 32bit driver and the 32bit driver does not appear in the 32bit ODBC connection manager (SysWOW64)
You need to add the following keys:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers]
"Progress OpenEdge 10.2A driver"="Installed"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Progress OpenEdge 10.2A Driver]
"Driver"="[DLC]\\bin\\pgoe1023.dll"
"Setup"="[DLC]\\bin\\pgoe1023.dll"
"DriverODBCVer"="3.50"
"APILevel"="1"
"ConnectFunctions"="YYN"
"CPTimeout"="60"
"FileUsage"="0"
"SQLLevel"="0"
"UsageCount"="1"
[DLC] should refer to the 10.2A installation directory
{From ProgressTalk Kbase Solution P141118} ERROR System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Be sure the ODBC connection is defined as a System DSN and was created using the C:\Windows\SysWow64\ODBCad32.exe Also be sure that the AppPool running a webservice using the DSN is enabled for 32 bit applications.
You are trying to create a 64bit ODBC connection using a 32bit driver and the 32bit driver does not appear in the 32bit ODBC connection manager (SysWOW64)
You need to add the following keys:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers]
"Progress OpenEdge 10.2A driver"="Installed"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Progress OpenEdge 10.2A Driver]
"Driver"="[DLC]\\bin\\pgoe1023.dll"
"Setup"="[DLC]\\bin\\pgoe1023.dll"
"DriverODBCVer"="3.50"
"APILevel"="1"
"ConnectFunctions"="YYN"
"CPTimeout"="60"
"FileUsage"="0"
"SQLLevel"="0"
"UsageCount"="1"
[DLC] should refer to the 10.2A installation directory
{From ProgressTalk Kbase Solution P141118} ERROR System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Be sure the ODBC connection is defined as a System DSN and was created using the C:\Windows\SysWow64\ODBCad32.exe Also be sure that the AppPool running a webservice using the DSN is enabled for 32 bit applications.
Thursday, August 12, 2010
Wednesday, August 04, 2010
Progress SQL ODBC errors:
i) System.Data.Odbc.OdbcException: ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Invalid number string (7498)
SOLUTION: Lookup Type/Value Not Found - check values bound to lists/types
ii) [PROGRESS]Lock table is full. (7870)
sol: # Lock Table Entries is too small. Increase in ODBC connection properties.
iii) [System.Data.Odbc.OdbcException] = {"ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Character string is too long (8184)"}
SOLUTION: Text in a Formatted field (Date or Time or Currency...) contains invalid or extra characters (" ", leading space).
iv) [ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented.
[OPENEDGE]Broker rejects connection
SOLUTION: PEO database is not setup for SQL (4GL only) OR Database needed a restart.
i) System.Data.Odbc.OdbcException: ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Invalid number string (7498)
SOLUTION: Lookup Type/Value Not Found - check values bound to lists/types
ii) [PROGRESS]Lock table is full. (7870)
sol: # Lock Table Entries is too small. Increase in ODBC connection properties.
iii) [System.Data.Odbc.OdbcException] = {"ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Character string is too long (8184)"}
SOLUTION: Text in a Formatted field (Date or Time or Currency...) contains invalid or extra characters (" ", leading space).
iv) [ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented.
[OPENEDGE]Broker rejects connection
SOLUTION: PEO database is not setup for SQL (4GL only) OR Database needed a restart.
Subscribe to:
Posts (Atom)