Click here to Skip to main content
15,921,210 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRepeat poster Pin
leckey15-May-07 4:22
leckey15-May-07 4:22 
Questionadding image Pin
cheerup_woe14-May-07 19:45
cheerup_woe14-May-07 19:45 
AnswerRe: adding image Pin
Christian Graus15-May-07 0:07
protectorChristian Graus15-May-07 0:07 
QuestionWhere is the "Trusted Publishers" certificate root in the registry Pin
Vivek Narayanan14-May-07 19:02
Vivek Narayanan14-May-07 19:02 
AnswerRe: Where is the "Trusted Publishers" certificate root in the registry Pin
Dave Kreskowiak15-May-07 3:40
mveDave Kreskowiak15-May-07 3:40 
GeneralRe: Where is the "Trusted Publishers" certificate root in the registry Pin
Vivek Narayanan15-May-07 19:50
Vivek Narayanan15-May-07 19:50 
GeneralRe: Where is the "Trusted Publishers" certificate root in the registry Pin
Dave Kreskowiak16-May-07 13:21
mveDave Kreskowiak16-May-07 13:21 
QuestionHelp :: syntax error Command for OleDbDataAdapter Pin
azusakt14-May-07 16:48
azusakt14-May-07 16:48 
Hi all,

I got syntax error when I update the database, and I don't know what I;m did wrong. Can some of you give me some hints

I have a database table, with the field "First Name","Last Name" ,
"Phone","Age" and "Status"

I don't know is the problem due to the tag "First Name" with the space character?

the following is my code for create OleDbDataAdapter:

<br />
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(selectCommand, connection)<br />
<br />
        adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey<br />
<br />
        adapter.InsertCommand = New OleDbCommand( _<br />
            "INSERT INTO wpGuest (First Name, Last Name, Phone, Age, Status) " & _<br />
             "VALUES (?, ?, ?, ?, ?)", connection)<br />
<br />
<br />
        adapter.UpdateCommand = New OleDbCommand( _<br />
            "UPDATE wpGuest SET First Name = ?, Last Name = ? , Phone = ? , Age = ? , Status = ? " & _<br />
            "WHERE First Name = ?", connection)<br />
<br />
<br />
        adapter.DeleteCommand = New OleDbCommand("DELETE FROM wpGuest WHERE First Name = ?", connection)<br />
<br />
<br />
        ' Create the parameters.<br />
        adapter.InsertCommand.Parameters.Add( _<br />
            "@First Name", OleDbType.Char, 50, "First Name")<br />
        adapter.InsertCommand.Parameters.Add( _<br />
            "@Last Name", OleDbType.Char, 50, "Last Name")<br />
        adapter.InsertCommand.Parameters.Add( _<br />
            "@Phone", OleDbType.Char, 50, "Phone")<br />
        adapter.InsertCommand.Parameters.Add( _<br />
            "@Age", OleDbType.Char, 50, "Age")<br />
        adapter.InsertCommand.Parameters.Add( _<br />
            "@Status", OleDbType.Char, 50, "Status")<br />
<br />
<br />
<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@First Name", OleDbType.Char, 50, "First Name").Value = "c"<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@Last Name", OleDbType.Char, 50, "Last Name").Value = "c"<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@Phone", OleDbType.Char, 50, "Phone").Value = "c"<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@Age", OleDbType.Char, 50, "Age").Value = "c"<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@Status", OleDbType.Char, 50, "Status").Value = "c"<br />
        adapter.UpdateCommand.Parameters.Add( _<br />
            "@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
            DataRowVersion.Original<br />
<br />
<br />
        adapter.DeleteCommand.Parameters.Add( _<br />
            "@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
            DataRowVersion.Original<br />
<br />

AnswerRe: Help :: syntax error Command for OleDbDataAdapter Pin
Dave Kreskowiak15-May-07 3:38
mveDave Kreskowiak15-May-07 3:38 
QuestionFolder Permissions Pin
Rose Rose14-May-07 16:43
Rose Rose14-May-07 16:43 
AnswerRe: Folder Permissions Pin
Sathesh Sakthivel14-May-07 16:49
Sathesh Sakthivel14-May-07 16:49 
GeneralRe: Folder Permissions Pin
Rose Rose14-May-07 16:57
Rose Rose14-May-07 16:57 
GeneralRe: Folder Permissions Pin
Sathesh Sakthivel14-May-07 18:00
Sathesh Sakthivel14-May-07 18:00 
QuestionHow to create a custom deployment project? Pin
tcombs0714-May-07 15:38
tcombs0714-May-07 15:38 
AnswerRe: How to create a custom deployment project? Pin
Dave Kreskowiak14-May-07 16:40
mveDave Kreskowiak14-May-07 16:40 
QuestionHow can I get the Microsoft SDK 5.1 Speech Engine to read the current line of text the cursor is on? Pin
josh047614-May-07 14:30
josh047614-May-07 14:30 
AnswerRe: How can I get the Microsoft SDK 5.1 Speech Engine to read the current line of text the cursor is on? Pin
Dave Kreskowiak14-May-07 16:38
mveDave Kreskowiak14-May-07 16:38 
QuestionArray to Datagrid back to array Pin
GregRH14-May-07 10:18
GregRH14-May-07 10:18 
AnswerRe: Array to Datagrid back to array Pin
Dave Kreskowiak15-May-07 3:35
mveDave Kreskowiak15-May-07 3:35 
GeneralRe: Array to Datagrid back to array Pin
GregRH15-May-07 4:28
GregRH15-May-07 4:28 
QuestionNeed help with my service please!!! Pin
tcombs0714-May-07 9:40
tcombs0714-May-07 9:40 
AnswerRe: Need help with my service please!!! Pin
Paul Conrad14-May-07 9:45
professionalPaul Conrad14-May-07 9:45 
AnswerRe: Need help with my service please!!! Pin
SimulationofSai14-May-07 9:52
SimulationofSai14-May-07 9:52 
AnswerRe: Need help with my service please!!! Pin
Dave Kreskowiak14-May-07 9:59
mveDave Kreskowiak14-May-07 9:59 
QuestionSelectedIndexChanged click item listbox database Pin
keninfo14-May-07 9:34
keninfo14-May-07 9:34 

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.