Click here to Skip to main content
14,773,067 members
Home » Discussions » Visual Basic
   

Visual Basic

 
AnswerRe: Recording a Phone Call Pin
Ray Cassick2-May-07 14:52
MemberRay Cassick2-May-07 14:52 
Questioncopy line from one txt file and place it to another txt file Pin
pankajs3k30-Apr-07 0:45
Memberpankajs3k30-Apr-07 0:45 
AnswerRe: copy line from one txt file and place it to another txt file Pin
Christian Graus30-Apr-07 1:21
protectorChristian Graus30-Apr-07 1:21 
GeneralRe: copy line from one txt file and place it to another txt file Pin
pankajs3k6-May-07 22:25
Memberpankajs3k6-May-07 22:25 
GeneralRe: copy line from one txt file and place it to another txt file Pin
Christian Graus7-May-07 2:09
protectorChristian Graus7-May-07 2:09 
QuestionNeed help for Importing .DAT files Pin
Jats_4ru30-Apr-07 0:31
MemberJats_4ru30-Apr-07 0:31 
AnswerRe: Need help for Importing .DAT files Pin
Colin Angus Mackay30-Apr-07 0:56
MemberColin Angus Mackay30-Apr-07 0:56 
QuestionRe: Need help for Importing .DAT files Pin
Jats_4ru30-Apr-07 2:11
MemberJats_4ru30-Apr-07 2: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 4:24
MemberColin Angus Mackay30-Apr-07 4:24 
QuestionCheck selected item of combobox Pin
Manfr3d30-Apr-07 0:28
MemberManfr3d30-Apr-07 0:28 
AnswerRe: Check selected item of combobox Pin
Colin Angus Mackay30-Apr-07 1:00
MemberColin Angus Mackay30-Apr-07 1:00 
Questionhelp in convertiting the vb code in vb.net Pin
Suhail Shahab29-Apr-07 22:55
MemberSuhail Shahab29-Apr-07 22:55 
AnswerRe: help in convertiting the vb code in vb.net Pin
Christian Graus30-Apr-07 1:22
protectorChristian Graus30-Apr-07 1:22 
Questionhow to detect storage device name in smart device Pin
laurensia inge29-Apr-07 22:08
Memberlaurensia inge29-Apr-07 22:08 
Questionremaining free space on HD Pin
charchabil0329-Apr-07 21:56
Membercharchabil0329-Apr-07 21:56 
AnswerRe: remaining free space on HD [modified] Pin
Sonia Gupta29-Apr-07 22:52
MemberSonia Gupta29-Apr-07 22:52 
AnswerRe: remaining free space on HD Pin
johnjsm30-Apr-07 8:25
Memberjohnjsm30-Apr-07 8:25 
QuestionHow to populate listbox with it's filepath Pin
x86phre3x29-Apr-07 21:37
Memberx86phre3x29-Apr-07 21:37 
AnswerRe: How to populate listbox with it's filepath Pin
Christian Graus29-Apr-07 21:59
protectorChristian Graus29-Apr-07 21:59 
AnswerRe: How to populate listbox with it's filepath Pin
A*****29-Apr-07 22:13
MemberA*****29-Apr-07 22:13 
GeneralRe: How to populate listbox with it's filepath Pin
x86phre3x30-Apr-07 20:26
Memberx86phre3x30-Apr-07 20:26 
Questionopen a new form from previous one Pin
dadhich29-Apr-07 21:33
Memberdadhich29-Apr-07 21:33 
AnswerRe: open a new form from previous one [modified] Pin
A*****29-Apr-07 21:41
MemberA*****29-Apr-07 21:41 
GeneralRe: open a new form from previous one Pin
Christian Graus29-Apr-07 21:59
protectorChristian Graus29-Apr-07 21:59 
GeneralRe: open a new form from previous one Pin
A*****29-Apr-07 22:16
MemberA*****29-Apr-07 22: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.