freelanceprogrammers.org Forum Index » ASP

Simple Database Problem


View user's profile Post To page top
bobfilipiak Posted: Fri Jun 24, 2005 10:35 pm


Joined: 06 Dec 2005

Posts: 4
Simple Database Problem
I`m reading selected records from one table in a database into a dataset and
then trying to insert the records into a different table in the database using:

For Each dRow2 in ds.Tables(0).Rows
ret = MyInsertMethod(Trim(dRow2.Item(1)), Trim(dRow2.Item(2)),
Trim(dRow2.Item(3)), CDate(dRow2.Item(4)), CDate(dRow2.Item(5)), dRow2.Item(6),
Trim((dRow2.Item(7))))
response.write(ret & "Record added")
Next

I`m getting: System.Data.SqlClient.SqlException: String or binary data would be
truncated. The statement has been terminated.

Here is the Function:
Function MyInsertMethod(ByVal networkEng As String, ByVal task As String, ByVal
actionType As String, ByVal startDate As Date, ByVal endDate As Date, ByVal hrs
As Single, ByVal probComment As String) As Integer

Any ideas?

[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help