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
alti balla
NA
14
1.2k
Conversions from c# to odbc sql server
Jun 8 2020 8:21 AM
hello ,
im having a problem converting from datetime c# to datetime sql server using odbc and time c# to time(7) sql server this is my code:
command.CommandText = "INSERT INTO pointer (Nom_employe, Date_Heure , Matin, Midi, apresmidi, Soir) VALUES ( ? ,? , ? , ?, ?, ?);";
// command.Parameters.AddWithValue("datetime", date_heure);
// command.Parameters.AddWithValue("nom", nom_employe);
command.Parameters.Add("@Nom", OdbcType.VarChar).Value = nom_employe;
command.Parameters.Add("@Date", OdbcType.Date).Value = Convert.ToDateTime( date_heure);
if (matin == null)
{
command.Parameters.Add("@Matin", OdbcType.Time).Value = null;
}
else
{
command.Parameters.Add("@Matin", OdbcType.Time).Value = TimeSpan.Parse(matin);
}
if (midi == null)
{
command.Parameters.Add("@Midi", OdbcType.Time).Value = null;
}
else
{
command.Parameters.Add("@Midi", OdbcType.Time).Value = TimeSpan.Parse(midi);
}
if (Apresmidi == null)
{
command.Parameters.Add("@Apresmidi", OdbcType.Time).Value = null;
}
else
{
command.Parameters.Add("@Apresmidi", OdbcType.Time).Value = TimeSpan.Parse( Apresmidi);
}
if (Soir == null)
{
command.Parameters.Add("@Soir", OdbcType.Time).Value = null;
}
else
{
command.Parameters.Add("@Soir", OdbcType.Time).Value = TimeSpan.Parse(Soir);
}
this is the error i am getting now : 'ERROR [HYC00] [Microsoft][ODBC SQL Server Driver]Fonctionnalité optionnelle non implémentée'
but befor this i had other errors about conversions and i dedn't manage to fix so i think the problem is still here ?
can i have some help please i have to deliver soon?
Reply
Answers (
2
)
How to customize function compress by zip to accept extensio
Read directory of files and write data into single file.