New said:
you should put your failing code into a try/catch block and then examine the
ex.message/stack trace. This may give you more information about why the
code is failing.
Try
'Your Code
Catch ex as exception
response.write( ex.message )
End Try
Ok so if my AccessDataSource fro the details is as below I can change
the InsertComand to
InsertComand="Try
INSERT INTO user_table (Image, ID, Title, ForeName, SurName,
PhoneNo, RoomNo, EMail, Role, Course, Year, Staff, BscInfo, MscInfo,
Mats, Cracks, HdrBoard, HdrForum, InfoSec, Lab, Media, PhdInfo,
PhdSuper, Research, Secs, Security, Teapot, UgBoard, UgVis, WWW,
StartDate, ProbabtionDate, EndDate, RetirementDate, FundingBody,
ResearchGroup, LineManager, PayCategory, Notes) VALUES (@Image, @ID,
@Title, @ForeName, @SurName, @PhoneNo, @RoomNo, @EMail, @Role, @Course,
@Year, @Staff, @BscInfo, @MscInfo @Mats, @Cracks, @HdrBoard, @HdrForum,
@InfoSec, @Lab, @Media, @PhdInfo, @PhdSuper, @Research, @Secs,
@Security, @Teapot, @UgBoard, @UgVis, @WWW, @StartDate, @ProbabtionDate,
@EndDate, @RetirementDate, @FundingBody, @ResearchGroup, @LineManager,
@PayCategory, @Notes)
Catch ex as exception
response.write( ex.message )
End Try
"
Or is this going to throw up an error?
Here is the current AccessDataSource im using
<asp:AccessDataSource id="DetailsSource" Runat="Server"
DataFile="C:\Program Files\Common Files\ODBC\Data Sources\user_info2.mdb"
SelectCommand="SELECT * FROM user_table WHERE ID = @ID"
InsertCommand="INSERT INTO user_table (Image, ID, Title, ForeName,
SurName, PhoneNo, RoomNo, EMail,
Role, Course, Year, Staff, BscInfo, MscInfo, Mats,
Cracks, HdrBoard, HdrForum, InfoSec, Lab,
Media, PhdInfo, PhdSuper, Research, Secs, Security, Teapot, UgBoard,
UgVis, WWW
StartDate, ProbabtionDate, EndDate, RetirementDate, FundingBody,
ResearchGroup, LineManager, PayCategory, Notes) VALUES (@Image, @ID,
@Title, @ForeName, @SurName,
@PhoneNo, @RoomNo, @EMail, @Role, @Course, @Year,
@Staff, @BscInfo, @MscInfo
@Mats, @Cracks, @HdrBoard, @HdrForum, @InfoSec, @Lab, @Media,
@PhdInfo, @PhdSuper, @Research, @Secs, @Security, @Teapot, @UgBoard,
@UgVis, @WWW, @StartDate, @ProbabtionDate, @EndDate, @RetirementDate,
@FundingBody, @ResearchGroup, @LineManager, @PayCategory, @Notes)"
UpdateCommand="UPDATE user_table SET ID=@ID, Image=@Image,
Title=@Title, ForeName=@ForeName, SurName=@SurName,
PhoneNo=@PhoneNo, RoomNo=@RoomNo, Email=@Email,
Role=@Role, Course=@Course, Year=@year, Staff=@Staff, BscInfo=@BscInfo,
MscInfo=@MscInfo, Mats=@Mats, Cracks=@Cracks, HdrBoard=@HdrBoard,
HdrForum=@HdrForum, InfoSec=@InfoSec,
Lab=@Lab, Media=@Media, PhdInfo=@PhdInfo, PhdSuper=@PhdSuper,
Research=@Research, Secs=@Secs,
Security=@Security, Teapot=@Teapot, UgBoard=@UgBoard, UgVis=@UgVis,
WWW=@WWW,
StartDate=@StartDate, ProbabtionDate=@ProbabtionDate,
EndDate=@EndDate, RetirementDate=@RetirementDate,
FundingBody=@FundingBody,
ResearchGroup=@ResearchGroup, LineManager=@LineManager,
PayCategory=@PayCategory, Notes=@Notes WHERE ID=@ID"