Click here to Skip to main content
15,918,596 members
Home / Discussions / Database
   

Database

 
GeneralRe: how to use max function Pin
Vimalsoft(Pty) Ltd30-Aug-07 19:47
professionalVimalsoft(Pty) Ltd30-Aug-07 19:47 
QuestionHow to create a new record, as part of a batch run, in MSAccess Pin
jonathanm529-Aug-07 22:08
jonathanm529-Aug-07 22:08 
AnswerRe: How to create a new record, as part of a batch run, in MSAccess Pin
Pete O'Hanlon29-Aug-07 23:05
mvePete O'Hanlon29-Aug-07 23:05 
QuestionVariable database name when executing stored procedure Pin
John Gathogo29-Aug-07 22:00
John Gathogo29-Aug-07 22:00 
AnswerRe: Variable database name when executing stored procedure Pin
DLM@TD14-Sep-07 11:31
DLM@TD14-Sep-07 11:31 
QuestionDIFFERENCE Pin
aprasy29-Aug-07 9:30
aprasy29-Aug-07 9:30 
AnswerRe: DIFFERENCE Pin
Pete O'Hanlon29-Aug-07 9:52
mvePete O'Hanlon29-Aug-07 9:52 
QuestionSQL Query for Excel file Pin
Swisher2429-Aug-07 6:55
Swisher2429-Aug-07 6:55 
I have several excel files(*.xls) that I'm extracting data from using Visual Basic and I'm having problems with my SQL statement. I would like to do a count & group by in the statement to input this data into a control sheet but I continue to get an error message when filling the dataset.

Error: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in microsoft.visualbasic.dll


Code Snippet:

Function groupxls(ByRef xlfile As String, ByRef xlsfile As String)

Dim ex1 As String = "Provider=Microsoft.Jet.OLEDB.4.0; " & "data source=" & xlfile & ";" & "Extended Properties=Excel 8.0;"
Dim conn1 As New OleDbConnection(ex1)
Dim dtset1 = New DataSet

Dim flnme As String
y = xlsfile.LastIndexOfAny(".")
flnme = xlsfile.Remove(y, 4)
Dim col1 As String = "sc_typname" '<-----Column to group by

Dim MyCommand1 As New OleDbDataAdapter("select count(*) from flnme group by col1", conn1)
    
        MyCommand1.Fill(dtset1)
        DataGrid1.Refresh()
        DataGrid1.DataSource = dtset1.Tables(0)
        conn1.Close()
        conn1.Dispose()

    End Function


If anyone can take the time to look at this for me please know that it will be very much appreciated! Thanks in advance! Smile | :)

Swish

AnswerRe: SQL Query for Excel file Pin
aztekka29-Aug-07 10:13
aztekka29-Aug-07 10:13 
GeneralRe: SQL Query for Excel file Pin
Swisher2430-Aug-07 4:00
Swisher2430-Aug-07 4:00 
Questiondata access Pin
Masoumeh...29-Aug-07 4:44
Masoumeh...29-Aug-07 4:44 
Questionhow to pass the output parameter while execute the stored procedure Pin
aprasy29-Aug-07 0:32
aprasy29-Aug-07 0:32 
AnswerRe: how to pass the output parameter while execute the stored procedure Pin
Rami Said Abd Alhalim29-Aug-07 3:54
Rami Said Abd Alhalim29-Aug-07 3:54 
AnswerRe: how to pass the output parameter while execute the stored procedure Pin
Rami Said Abd Alhalim29-Aug-07 3:57
Rami Said Abd Alhalim29-Aug-07 3:57 
GeneralRe: how to pass the output parameter while execute the stored procedure Pin
aprasy29-Aug-07 9:28
aprasy29-Aug-07 9:28 
QuestionSimultaneous access to DB Pin
blackjack215029-Aug-07 0:30
blackjack215029-Aug-07 0:30 
AnswerRe: Simultaneous access to DB Pin
Colin Angus Mackay29-Aug-07 2:21
Colin Angus Mackay29-Aug-07 2:21 
GeneralRe: Simultaneous access to DB Pin
blackjack215029-Aug-07 2:43
blackjack215029-Aug-07 2:43 
QuestionWhat data type is case sensitive? Pin
Big Ralph29-Aug-07 0:28
Big Ralph29-Aug-07 0:28 
AnswerRe: What data type is case sensitive? Pin
Colin Angus Mackay29-Aug-07 2:17
Colin Angus Mackay29-Aug-07 2:17 
GeneralRe: What data type is case sensitive? Pin
Big Ralph29-Aug-07 3:28
Big Ralph29-Aug-07 3:28 
GeneralRe: What data type is case sensitive? Pin
Rami Said Abd Alhalim29-Aug-07 4:03
Rami Said Abd Alhalim29-Aug-07 4:03 
GeneralRe: What data type is case sensitive? Pin
Big Ralph29-Aug-07 4:46
Big Ralph29-Aug-07 4:46 
GeneralRe: What data type is case sensitive? Pin
Colin Angus Mackay29-Aug-07 10:03
Colin Angus Mackay29-Aug-07 10:03 
JokeRe: What data type is case sensitive? Pin
Pete O'Hanlon29-Aug-07 10:23
mvePete O'Hanlon29-Aug-07 10:23 

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.