Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
basicconfiguration
Constraint Violating Yak Guru
358 Posts |
Posted - 2009-03-05 : 14:23:43
|
I have a package that throws me this error. How could I troubleshoot it?Script Component: Runtime ErrorThe column has a null value. at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.CheckStatusAndNull(Int32 columnIndex) at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.GetDateTime(Int32 columnIndex) at ScriptComponent_c16d1491550c4de7b7310feb19e0215f.vbproj.Input0Buffer.get_picpudt() at ScriptComponent_c16d1491550c4de7b7310feb19e0215f.vbproj.ScriptMain.Input0_ProcessInputRow(Input0Buffer Row) at ScriptComponent_c16d1491550c4de7b7310feb19e0215f.vbproj.UserComponent.Input0_ProcessInput(Input0Buffer Buffer) at ScriptComponent_c16d1491550c4de7b7310feb19e0215f.vbproj.UserComponent.ProcessInput(Int32 InputID, PipelineBuffer Buffer) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer) |
|
tmitch
Yak Posting Veteran
60 Posts |
Posted - 2009-03-05 : 15:39:54
|
You'll have to provide more information than this to get any help. What are you trying to do with your script component?---------------------Tim Mitchellwww.BucketOfBits.com |
 |
|
basicconfiguration
Constraint Violating Yak Guru
358 Posts |
Posted - 2009-03-06 : 17:39:10
|
I'm checking if column picpudt meets 4 conditions. If it does make column HasPickupTime = 0 else HasPickupTime = 1 picpudt < '1900/01/01' or picpudt > '2050/01/01' or picpudt is null or picpudt = '00:00:00' Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer) ' ' Add your code here ' If Row.picpudt < CDate("1900/01/01") Or Row.picpudt > CDate("2050/01/01") Or Row.picputm = "" Or Row.picputm = "00:00:00" Then Row.HasPickupTime = False Else Row.HasPickupTime = True End If End Sub |
 |
|
tmitch
Yak Posting Veteran
60 Posts |
Posted - 2009-03-06 : 22:10:39
|
A couple of things you should do... first, replace your "Or" keywords with "OrElse". This will short circuit the application on the first true statement you find. Not a huge issue, but could help performance.Also, replace the statement Row.picputm = "" withRow.picputm_IsNull = True The *FieldName*_IsNull is a special property that can be used to check the value for null. You should put the IsNull test before all other in your If statement.hth,Tim---------------------Tim Mitchellwww.BucketOfBits.com |
 |
|
basicconfiguration
Constraint Violating Yak Guru
358 Posts |
Posted - 2009-03-10 : 13:06:55
|
Thank u man |
 |
|
|
|
|