Click here to Skip to main content
15,903,362 members
Home / Discussions / Database
   

Database

 
AnswerRe: Mulitple Database using Reporting Services... Pin
Paddy Boyd8-Dec-08 2:32
Paddy Boyd8-Dec-08 2:32 
GeneralRe: Mulitple Database using Reporting Services... Pin
cbe_pav9-Dec-08 1:19
cbe_pav9-Dec-08 1:19 
QuestionGet SQL Data Type Pin
Shivan Nandan5-Dec-08 18:11
Shivan Nandan5-Dec-08 18:11 
AnswerRe: Get SQL Data Type Pin
H2ppYstaR5-Dec-08 18:28
H2ppYstaR5-Dec-08 18:28 
QuestionHow to get the list of Names which starts with numerics. Pin
K V Sekhar5-Dec-08 17:45
K V Sekhar5-Dec-08 17:45 
AnswerRe: How to get the list of Names which starts with numerics. Pin
Wendelius5-Dec-08 21:56
mentorWendelius5-Dec-08 21:56 
GeneralRe: How to get the list of Names which starts with numerics. Pin
K V Sekhar5-Dec-08 22:03
K V Sekhar5-Dec-08 22:03 
GeneralRe: How to get the list of Names which starts with numerics. Pin
Wendelius6-Dec-08 1:27
mentorWendelius6-Dec-08 1:27 
AnswerRe: How to get the list of Names which starts with numerics. Pin
Mycroft Holmes6-Dec-08 15:28
professionalMycroft Holmes6-Dec-08 15:28 
GeneralRe: How to get the list of Names which starts with numerics. Pin
K V Sekhar7-Dec-08 17:19
K V Sekhar7-Dec-08 17:19 
AnswerRe: How to get the list of Names which starts with numerics. Pin
Ashfield7-Dec-08 21:37
Ashfield7-Dec-08 21:37 
GeneralRe: How to get the list of Names which starts with numerics. Pin
K V Sekhar7-Dec-08 22:46
K V Sekhar7-Dec-08 22:46 
AnswerRe: How to get the list of Names which starts with numerics. Pin
K V Sekhar18-Dec-08 18:56
K V Sekhar18-Dec-08 18:56 
Questionsybase version 6 Pin
postonoh5-Dec-08 7:46
postonoh5-Dec-08 7:46 
AnswerRe: sybase version 6 Pin
Mycroft Holmes5-Dec-08 14:48
professionalMycroft Holmes5-Dec-08 14:48 
QuestionUsing DataTable.Select in the slickest way possible Pin
jesarg5-Dec-08 6:55
jesarg5-Dec-08 6:55 
AnswerRe: Using DataTable.Select in the slickest way possible Pin
Wendelius5-Dec-08 7:16
mentorWendelius5-Dec-08 7:16 
QuestionUgly group by problem Pin
gantww5-Dec-08 5:40
gantww5-Dec-08 5:40 
AnswerRe: Ugly group by problem Pin
Ben Fair5-Dec-08 5:54
Ben Fair5-Dec-08 5:54 
Questionretrieve from 3 table Pin
benjamin yap5-Dec-08 4:38
benjamin yap5-Dec-08 4:38 
AnswerRe: retrieve from 3 table Pin
Ben Fair5-Dec-08 5:38
Ben Fair5-Dec-08 5:38 
QuestionHow can I insert a record into a table in SQLCE? Pin
JUNEYT5-Dec-08 0:10
JUNEYT5-Dec-08 0:10 
Hi,

I performed a search in google and found different answers to my question. However none of them did work out. I am able to read from a table but when I try to insert into a table, it doesn't insert and it doesn't give me any error message. I am using SQLCE in Windows Mobile 6.1 OS. If you give me a working sample for INSERT statment in SQLCE, I would really appreciate it.

The code below neither does insert the record into table nor produce any error.

Dim myconnection As New SqlCeConnection(ConnStr)
Dim mycommand As New SqlCeCommand
Dim InsertStr As String = Nothing

mycommand.CommandType = CommandType.Text
mycommand.Connection = myconnection

Dim xdate As Date = DateTimePicker1.Value
xdate = xdate.ToShortDateString


InsertStr = "INSERT INTO Expenses ([Date],BelongTo,Status,ExpenseAmount,ExpenseCurrency) "
InsertStr += "VALUES ('" & xdate & "'," & ExpenseIndex & ",0," & CType(ExpenseAmount.Text, Decimal) & "," & "'" & Currency.SelectedItem.ToString & "');"

mycommand.CommandText = InsertStr

Try
    mycommand.Connection.Open()
    mycommand.ExecuteNonQuery()

Catch ex As Exception
    MsgBox(ex.ToString & vbCrLf & InsertStr)
    mycommand.Connection.Close()
    Exit Sub
End Try

mycommand.Connection.Close()



What a curious mind needs to discover knowledge is noting else than a pin-hole.


AnswerRe: How can I insert a record into a table in SQLCE? Pin
Wendelius5-Dec-08 7:38
mentorWendelius5-Dec-08 7:38 
Questionsql server 2008 Filestream Pin
lambo4-Dec-08 21:19
lambo4-Dec-08 21:19 
AnswerRe: sql server 2008 Filestream Pin
Mycroft Holmes4-Dec-08 21:32
professionalMycroft Holmes4-Dec-08 21:32 

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.