Conversion from type "DbNull" to type Interger is Invalid

1,532 views
Skip to first unread message

Sitam Suvam Jena

unread,
Jun 10, 2015, 5:13:42 AM6/10/15
to arc...@googlegroups.com
while importing the precipitation file i faced this error

Conversion from type "DbNull" to type Integer is Invalid.
any solution?

Nina Zarrineh

unread,
Jun 10, 2015, 8:01:41 AM6/10/15
to arc...@googlegroups.com
I have the same problem for all input weather files except pcp file for that one I get Syntax error for date expression "#01.01.1981#" which after changin the error is "String was not recognized as a valid Date Time" . Any idea?...

Iman Fazeli

unread,
Jun 10, 2015, 8:16:02 AM6/10/15
to Nina Zarrineh, arc...@googlegroups.com
Dear Nina and Sitam,

Removed the extra lines in Notepad and it will be work. I guess you have some space after the final integer. somewhere the number you have entered is invalid. I suggest you remove blank spaces at the end of the your "txt" or "dbf" files and try again.

Best,
Iman

--
You received this message because you are subscribed to the Google Groups "ArcSWAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arcswat+u...@googlegroups.com.
To post to this group, send email to arc...@googlegroups.com.
Visit this group at http://groups.google.com/group/arcswat.
For more options, visit https://groups.google.com/d/optout.

Nina Zarrineh

unread,
Jun 10, 2015, 8:32:42 AM6/10/15
to arc...@googlegroups.com, ninaz...@gmail.com
Dear Iman,
Thanks for your answer, I tried this way but the error was not changed. But the strenge thing is that during checking many different solutions SWAT accepted once the pcp file even by error but did not accept the rest of the weather input files now I have error for date just for pcp and "DbNull" to type Integer is Invalid, for the rest. Anyway I hope someone has a solution for this. Thanks for your answer.
Regards,
Nina

Arcadius Degan

unread,
Feb 16, 2017, 5:41:32 AM2/16/17
to ArcSWAT
Hey Nina!
i got the same problem. I don't know if you finally resolved it.
Could you share the result if possible?
Regards.
my problem came when i was creating the Arcswat inputs tables following by this message: IN,mWriteInputFiles.mgt

Nilkanth Herbha

unread,
May 22, 2019, 2:04:44 AM5/22/19
to ArcSWAT
Hello Arcadius,
        if you have solved the problem please post a solution to fix it. waiting for your reply.

Nirmal Kumar

unread,
Jan 20, 2020, 8:10:07 AM1/20/20
to ArcSWAT
1-Open the Pcp.txt and Tmp.txt file in which all the station information (Lat. Lon. elevation) is defined.
2- Remove all the space from the below side of these two file (Pcp.txt and Tmp.txt ) and save it.
3-Input the wgen and weather information
It will work...

Shuvra Bijukshe

unread,
Mar 4, 2023, 10:21:08 AM3/4/23
to ArcSWAT
Thank you all for the clarification.
Reply all
Reply to author
Forward
0 new messages