kmohangoud
New member
- Joined
- Aug 18, 2008
- Messages
- 1
- Programming Experience
- Beginner
Hi ... I am trying to update records in SQL server 2005 database through VB.NET
dim ds as new dataset
dim da as new sqldataadapter("select * from vtable ",con)
da.fill(ds,"vt")
vid=ds.tables("vt").rows(0).item(vno).tostring
rno=ds.tables("vt").rows(0).item(regno)
dim da1 as new sqldataadapter("select sno from rttable where reno=100",won)
dim ds2 as new dataset
da1.fill(ds2,"rt")
sno=ds2.tables("rt").rows(0).item(sno)
ds1.tables(vt).rows(0).item("sno")=sno
da1.update(ds,"vt")
dim commandbuilder as new commandbuilder(da1)
but it keeps giving me an error ... :
da1.update(ds,"vt")------>string or binary data would be truncated
PLEASE HELP
Thanks
dim ds as new dataset
dim da as new sqldataadapter("select * from vtable ",con)
da.fill(ds,"vt")
vid=ds.tables("vt").rows(0).item(vno).tostring
rno=ds.tables("vt").rows(0).item(regno)
dim da1 as new sqldataadapter("select sno from rttable where reno=100",won)
dim ds2 as new dataset
da1.fill(ds2,"rt")
sno=ds2.tables("rt").rows(0).item(sno)
ds1.tables(vt).rows(0).item("sno")=sno
da1.update(ds,"vt")
dim commandbuilder as new commandbuilder(da1)
but it keeps giving me an error ... :
da1.update(ds,"vt")------>string or binary data would be truncated
PLEASE HELP
Thanks