Click here to Skip to main content
15,914,111 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem occurs when running ASP.NET application on Windows Server 2003 Pin
Michael Sync20-Aug-07 16:03
Michael Sync20-Aug-07 16:03 
QuestionInsert Command for decimal Pin
williammcq20-Aug-07 13:22
williammcq20-Aug-07 13:22 
AnswerRe: Insert Command for decimal Pin
Michael Sync20-Aug-07 15:10
Michael Sync20-Aug-07 15:10 
GeneralRe: Insert Command for decimal Pin
williammcq20-Aug-07 16:33
williammcq20-Aug-07 16:33 
GeneralRe: Insert Command for decimal Pin
Michael Sync20-Aug-07 17:00
Michael Sync20-Aug-07 17:00 
GeneralRe: Insert Command for decimal Pin
williammcq20-Aug-07 17:15
williammcq20-Aug-07 17:15 
GeneralRe: Insert Command for decimal Pin
williammcq20-Aug-07 18:33
williammcq20-Aug-07 18:33 
GeneralRe: Insert Command for decimal Pin
Michael Sync20-Aug-07 19:57
Michael Sync20-Aug-07 19:57 
Maybe. you can try like that..

using System.Data.OleDb;

 OleDbConnection dbConn = new OleDbConnection ("connectionstring");<br />
            dbConn.Open ();<br />
            OleDbCommand cmd = new OleDbCommand ();<br />
            cmd.Connection = dbConn;<br />
            cmd.CommandText = "INSERT INTO [VPO] ([OrderDate], [Project], [Supplies], [NoExceed])VALUES (@OrderDate, @Project, @Supplies, @NoExceed)";<br />
<br />
            cmd.Parameters.Add("OrderDate", OleDbType.Date, Now());<br />
            cmd.Parameters.Add("Project", Project);<br />
            cmd.Parameters.Add ("Supplies", OleDbType.Boolean, Supplies);<br />
            cmd.Parameters.Add("NoExceed", OleDbType.Currency , NoExceed); //I assumed that the datatype of this column in MS Access is "Currency".<br />
<br />
            cmd.ExecuteNonQuery ();<br />
<br />
            cmd.Dispose ();<br />
            dbConn.Close ();



williammcq wrote:

Doe the fact that this is a Access DB and not a SQL DB causing a problem?


maybe. or may not be... AFAIK, we should use OleDb for MS Access Database and SqlClient for SQL Database. I didn't see any documentation mentioned that SqlClient should be used for Microsoft Access Database.


Hope it helps..



Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

GeneralRe: Insert Command for decimal Pin
williammcq22-Aug-07 8:47
williammcq22-Aug-07 8:47 
QuestionSaving my menus Pin
2hdass20-Aug-07 10:08
2hdass20-Aug-07 10:08 
AnswerRe: Saving my menus Pin
Christian Graus20-Aug-07 10:57
protectorChristian Graus20-Aug-07 10:57 
GeneralRe: Saving my menus Pin
2hdass21-Aug-07 3:36
2hdass21-Aug-07 3:36 
QuestionSharing multimedia files over IIS Pin
juli Paris20-Aug-07 8:22
juli Paris20-Aug-07 8:22 
AnswerRe: Sharing multimedia files over IIS Pin
Rama Krishna Vavilala20-Aug-07 11:17
Rama Krishna Vavilala20-Aug-07 11:17 
QuestionRe: Sharing multimedia files over IIS Pin
juli Paris21-Aug-07 0:19
juli Paris21-Aug-07 0:19 
QuestionAdd menu like winApplication Menu.... Pin
mostafa_h20-Aug-07 8:06
mostafa_h20-Aug-07 8:06 
QuestionSql Server 2005 required? Pin
Richard Jones20-Aug-07 7:57
Richard Jones20-Aug-07 7:57 
Questionglobal database connection Pin
PaulaM20-Aug-07 5:47
PaulaM20-Aug-07 5:47 
AnswerRe: global database connection Pin
Eduard Keilholz20-Aug-07 6:01
Eduard Keilholz20-Aug-07 6:01 
QuestionPassing VB variables to Javascript code Pin
beish120-Aug-07 5:00
beish120-Aug-07 5:00 
AnswerRe: Passing VB variables to Javascript code Pin
peacefulmember20-Aug-07 6:06
peacefulmember20-Aug-07 6:06 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 6:44
beish120-Aug-07 6:44 
GeneralRe: Passing VB variables to Javascript code Pin
peacefulmember20-Aug-07 6:57
peacefulmember20-Aug-07 6:57 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 12:59
beish120-Aug-07 12:59 
AnswerRe: Passing VB variables to Javascript code Pin
Michael Sync20-Aug-07 7:09
Michael Sync20-Aug-07 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.