Click here to Skip to main content
15,901,426 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Recording a Phone Call Pin
Ray Cassick2-May-07 13:52
Ray Cassick2-May-07 13:52 
Questioncopy line from one txt file and place it to another txt file Pin
pankajs3k29-Apr-07 23:45
pankajs3k29-Apr-07 23:45 
AnswerRe: copy line from one txt file and place it to another txt file Pin
Christian Graus30-Apr-07 0:21
protectorChristian Graus30-Apr-07 0:21 
GeneralRe: copy line from one txt file and place it to another txt file Pin
pankajs3k6-May-07 21:25
pankajs3k6-May-07 21:25 
GeneralRe: copy line from one txt file and place it to another txt file Pin
Christian Graus7-May-07 1:09
protectorChristian Graus7-May-07 1:09 
QuestionNeed help for Importing .DAT files Pin
Jats_4ru29-Apr-07 23:31
Jats_4ru29-Apr-07 23:31 
AnswerRe: Need help for Importing .DAT files Pin
Colin Angus Mackay29-Apr-07 23:56
Colin Angus Mackay29-Apr-07 23:56 
QuestionRe: Need help for Importing .DAT files Pin
Jats_4ru30-Apr-07 1:11
Jats_4ru30-Apr-07 1:11 
I had tried that before, but its not working.
As the file type is .DAT, there is some problem with the connection string b'cause when i opened the connection and tried to assaign the data to a datagridview its throwing an error stating "ERROR [42000] [Microsoft][ODBC Text Driver] Cannot update. Database or object is read-only."

The code is as follows....
Private Sub ConnectDAT()
ds = New DataSet()
Dim sql_select As String
Dim strConn As String = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + TextBox1.Text.Trim() + ";Extensions=asc,csv,tab,txt;Persist Security Info=False"

' The connection string is given as "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=D:\Folder;Extensions=asc,csv,tab,txt;Persist Security Info=False"

Dim conn As OdbcConnection
conn = New System.Data.Odbc.OdbcConnection(strConn.Trim)
conn.Open()
sql_select = "select * from [" + strCSVFile + "]"
obj_oledb_da1 = New System.Data.Odbc.OdbcDataAdapter(sql_select, conn)
obj_oledb_da1.Fill(ds, "CInfo")
DataGridView1.DataSource = ds
DataGridView1.DataMember = "CInfo"
conn.Close()
End Sub

Can you help me...in solving the problem...





Jats
AnswerRe: Need help for Importing .DAT files Pin
Colin Angus Mackay30-Apr-07 3:24
Colin Angus Mackay30-Apr-07 3:24 
QuestionCheck selected item of combobox Pin
Manfr3d29-Apr-07 23:28
Manfr3d29-Apr-07 23:28 
AnswerRe: Check selected item of combobox Pin
Colin Angus Mackay30-Apr-07 0:00
Colin Angus Mackay30-Apr-07 0:00 
Questionhelp in convertiting the vb code in vb.net Pin
Suhail Shahab29-Apr-07 21:55
Suhail Shahab29-Apr-07 21:55 
AnswerRe: help in convertiting the vb code in vb.net Pin
Christian Graus30-Apr-07 0:22
protectorChristian Graus30-Apr-07 0:22 
Questionhow to detect storage device name in smart device Pin
laurensia inge29-Apr-07 21:08
laurensia inge29-Apr-07 21:08 
Questionremaining free space on HD Pin
charchabil0329-Apr-07 20:56
charchabil0329-Apr-07 20:56 
AnswerRe: remaining free space on HD [modified] Pin
Sonia Gupta29-Apr-07 21:52
Sonia Gupta29-Apr-07 21:52 
AnswerRe: remaining free space on HD Pin
johnjsm30-Apr-07 7:25
johnjsm30-Apr-07 7:25 
QuestionHow to populate listbox with it's filepath Pin
x86phre3x29-Apr-07 20:37
x86phre3x29-Apr-07 20:37 
AnswerRe: How to populate listbox with it's filepath Pin
Christian Graus29-Apr-07 20:59
protectorChristian Graus29-Apr-07 20:59 
AnswerRe: How to populate listbox with it's filepath Pin
A*****29-Apr-07 21:13
A*****29-Apr-07 21:13 
GeneralRe: How to populate listbox with it's filepath Pin
x86phre3x30-Apr-07 19:26
x86phre3x30-Apr-07 19:26 
Questionopen a new form from previous one Pin
dadhich29-Apr-07 20:33
dadhich29-Apr-07 20:33 
AnswerRe: open a new form from previous one [modified] Pin
A*****29-Apr-07 20:41
A*****29-Apr-07 20:41 
GeneralRe: open a new form from previous one Pin
Christian Graus29-Apr-07 20:59
protectorChristian Graus29-Apr-07 20:59 
GeneralRe: open a new form from previous one Pin
A*****29-Apr-07 21:16
A*****29-Apr-07 21:16 

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.