This project has moved. For the latest updates, please go here.

X12.ImportX12 not creating all segment tables

Oct 17, 2013 at 5:02 PM
I have a known good EDI 834 file, however I cannot seem to fully import segment tables to SQL DB.
Some Tables are created, but it stops after 3 or 4 indexed segemnt tables. Error.log below.
Looks like it a data type error, but I dont see any configuration options to change datatypes, what am I missing?

Column, parameter, or variable #11: Cannot find data type date.
OopFactory.X12.ImportX12.exe Error: 0 : Error parsing C:\Temp\Inbound\834.EDI: Column, parameter, or variable #11: Cannot find data type date.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at OopFactory.X12.Repositories.DbCreation`1.ExecuteCmd(SqlCommand cmd)
   at OopFactory.X12.Repositories.DbCreation`1.CreateIndexedSegmentTable(SegmentSpecification spec, String commonSchema)
   at OopFactory.X12.Repositories.SqlTransactionRepository`1.EnsureSchema()
   at OopFactory.X12.Repositories.SqlTransactionRepository`1.Save(Interchange interchange, String filename, String userName)
   at OopFactory.X12.ImportX12.Program.Main(String[] args)
   DateTime=2013-10-17T15:51:45.6851170Z
Coordinator
Oct 17, 2013 at 5:05 PM
You are using a version of SQL Server that does not support the date data type. It probably needs to be changed to datetime. I will see if I can work on this this weekend, I should be able to inspect the version of SQL server and make the decision dynamically whether this should be a date or datetime. Let me know what version of SQL you are using so that I can test for that.
Oct 17, 2013 at 5:08 PM
I am using Microsoft SQL Server Standard Edition 9.00.5069.00 (2005)
Thanks for taking a look.
Oct 17, 2013 at 8:23 PM
...................I voted here :)
Oct 21, 2013 at 4:27 PM
I have since imported this on Server 2008, working fine. I can still help you test on 2005 if you like.