TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jimmy shown
NA
6
5.8k
add null value in oracle database
Mar 5 2011 9:10 AM
I am trying to add null value in my oracle database but its not Inserting any record, not even inserting null value and not throwing any error also...
Please, help...
Dim
sqlStmt
As
String
Dim
conString
As
String
Dim
cn
As
OracleConnection
Dim
cmd
As
OracleCommand
Dim
sqldatenull
As
OracleDate
Try
sqlStmt =
"insert into temp (startdate, enddate) Values (@startdate, @enddate)"
'conString = "server=localhost;database=Northwind;uid=sa;pwd=;"
conString =
cn =
New
OracleConnection(conString)
cmd = New OracleCommand(sqlStmt, cn)
"Data Source=abc; User Id=abc;Password=ab"
cmd.Parameters.Add(
cmd.Parameters.Add(
New
OracleParameter (
"@enddate"
, OracleDbType.TimeStamp))sqldatenull = oracledate.null
If
New
OracleParameter (
"@startdate"
, OracleDbType.TimeStamp))
cmd.Parameters(
'cmd.Parameters("@Date").Value = DBNull.Value
Else
"@EndDate"
).Value = DateTime.Parse(txtEndDate.Text)
"@EndDate"
).Value = sqldatenull
Reply
Answers (
5
)
Picture through webcam not working
Automatic reminder