Click here to Skip to main content
16,011,711 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Creating a file directory VB Pin
Dave Kreskowiak6-Oct-08 16:04
mveDave Kreskowiak6-Oct-08 16:04 
Questionvb.net to vb script converter Pin
lostboy2416-Oct-08 9:13
lostboy2416-Oct-08 9:13 
AnswerRe: vb.net to vb script converter Pin
Paul Conrad6-Oct-08 9:48
professionalPaul Conrad6-Oct-08 9:48 
AnswerRe: vb.net to vb script converter Pin
Dave Kreskowiak6-Oct-08 10:38
mveDave Kreskowiak6-Oct-08 10:38 
GeneralRe: vb.net to vb script converter Pin
lostboy2416-Oct-08 14:01
lostboy2416-Oct-08 14:01 
QuestionRight fax issue with email ID format Pin
lostboy2416-Oct-08 4:25
lostboy2416-Oct-08 4:25 
QuestionLSA Functions Problems Pin
cyberhiker6-Oct-08 4:21
cyberhiker6-Oct-08 4:21 
QuestionPrimary key problem from .csv file ODBC Pin
cstrader2326-Oct-08 2:20
cstrader2326-Oct-08 2:20 
Hello,

I'm using an odbc adapter to read from a .csv file. But I'm having trouble updating it.

The update command creates the error:

Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return
any key column information.

Here's the code.

Thanks!

Dim da As New Odbc.OdbcDataAdapter("SELECT * FROM datafiles\tickernames.csv ", cn)

Dim ds As New DataSet
da.Fill(ds)

'Set the primary key
Dim pk1(0) As DataColumn
pk1(0) = ds.Tables(0).Columns("ShortName")
ds.Tables(0).PrimaryKey = pk1

'Modify a row
ds.Tables(0).Rows(0).Item(0) = "AAAA"

'Set the default commands and update
Dim cb As New Odbc.OdbcCommandBuilder(da)
da.Update(ds, ds.Tables(0).TableName)
AnswerRe: Primary key problem from .csv file ODBC Pin
Dave Kreskowiak6-Oct-08 6:25
mveDave Kreskowiak6-Oct-08 6:25 
GeneralRe: Primary key problem from .csv file ODBC Pin
cstrader2327-Oct-08 1:49
cstrader2327-Oct-08 1:49 
QuestionProject help Pin
sweetlover7546-Oct-08 0:13
sweetlover7546-Oct-08 0:13 
AnswerRe: Project help Pin
Ashfield6-Oct-08 0:50
Ashfield6-Oct-08 0:50 
GeneralRe: Project help Pin
sweetlover7546-Oct-08 4:43
sweetlover7546-Oct-08 4:43 
GeneralRe: Project help Pin
Dave Kreskowiak6-Oct-08 6:18
mveDave Kreskowiak6-Oct-08 6:18 
GeneralRe: Project help Pin
Paul Conrad6-Oct-08 7:31
professionalPaul Conrad6-Oct-08 7:31 
GeneralRe: Project help Pin
Ashfield6-Oct-08 19:54
Ashfield6-Oct-08 19:54 
AnswerRe: Project help Pin
leckey6-Oct-08 13:20
leckey6-Oct-08 13:20 
QuestionHow to use single MDI Child Form for all Crystal reports Pin
kedarrkulkarni5-Oct-08 22:40
kedarrkulkarni5-Oct-08 22:40 
AnswerRe: How to use single MDI Child Form for all Crystal reports Pin
Mycroft Holmes5-Oct-08 22:55
professionalMycroft Holmes5-Oct-08 22:55 
Questionincluding line/scatter chart in VB.net Pin
Amanjot5-Oct-08 13:42
Amanjot5-Oct-08 13:42 
AnswerRe: including line/scatter chart in VB.net Pin
Rupesh Kumar Swami5-Oct-08 20:41
Rupesh Kumar Swami5-Oct-08 20:41 
AnswerRe: including line/scatter chart in VB.net Pin
Thomas Stockwell6-Oct-08 6:14
professionalThomas Stockwell6-Oct-08 6:14 
AnswerRe: including line/scatter chart in VB.net Pin
Dave Kreskowiak6-Oct-08 6:20
mveDave Kreskowiak6-Oct-08 6:20 
GeneralRe: including line/scatter chart in VB.net Pin
Amanjot6-Oct-08 16:29
Amanjot6-Oct-08 16:29 
GeneralRe: including line/scatter chart in VB.net Pin
Dave Kreskowiak7-Oct-08 2:01
mveDave Kreskowiak7-Oct-08 2:01 

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.