Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Swisher24

@Swisher24
About
Posts
10
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating Tab Delimited Output File
    S Swisher24

    Thanks Dave for taking the time to explain. Though I've never worked with Crystal Reports I'm going to give it a try. Thanks!;)

    Swish

    Visual Basic help question

  • Creating Tab Delimited Output File
    S Swisher24

    Thanks guy's for replying. The alignment is thrown off by the strings length. And right now padding is still throwing off the alignment. I'm using "Arial" with a font size of "8" and pagesettings.landscape = True. Dave your right, but I'm having trouble with the layout of the report. Is there a better method of creating reports that have correct alignment in a text, rtf or doc file? Or have the app write to a specific location within the file to better align the report? Swish

    Visual Basic help question

  • Creating Tab Delimited Output File
    S Swisher24

    I'm using a streamwriter to output 4 columns of data into a text file. Unfortunately the columns aren't lining up correctly. I've tried using Controlchars.tab & vbTab which do not work. Is there any way to create tabs in the writeline method or would I need to switch to a rich text file for this? If anyone can help it would be greatly appreciated! Oh yeah I'm using Visual Basic 2003. Swish

    Visual Basic help question

  • SQL Query for Excel file
    S Swisher24

    Thanks aztekka! I tried this sql statement and I'm still getting an Unhandled Exception Error. I'm thinking that VB 2003 doesn't like the statement somehow. I will continue to work on this and any more help that can be provided will be very appreciated.

    Swish

    Database database help

  • Cycling through Excel using VB 2003 to find duplicates
    S Swisher24

    I tried working the sql statement you posted and I still receive the Unhandled Exception Error. I've even tried tweaking it by taking the "group by" out of the statement. But I'm going to continue to tweek the code maybe VB 2003 doesn't like something about the statement.

    Swish

    Visual Basic

  • SQL Query for Excel file
    S Swisher24

    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! :)

    Swish

    Database database help

  • Cycling through Excel using VB 2003 to find duplicates
    S Swisher24

    I'm connecting to the excel file but having trouble with the SQL group by statement. I'm getting an error when the dataset is being filled by the OLEAdapter; An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in microsoft.visualbasic.dll Below is a sample of the code: Dim ex As String = "Provider=Microsoft.Jet.OLEDB.4.0; " & "data source=" & xlfile & ";" & "Extended Properties=Excel 8.0;" Dim conn1 As New OleDbConnection(ex) Dim dtset1 = New DataSet Dim col1 As String = "sc_typname" '<-----Column to group by Dim MyCommand1 As New OleDbDataAdapter("select * from [flnme$] Group By col1", conn1) MyCommand1.Fill(dtset1) DataGrid1.DataSource = dtset1.Tables(0) conn1.Close() Am I missing any information or how can resolve this error? Swish

    Visual Basic

  • Cycling through Excel using VB 2003 to find duplicates
    S Swisher24

    I'm using VB 2003 to extract data from an excel file but I'm having trouble looping through one column to find duplicates and counting how may times a cell value is duplicated :confused:. If any one can please feel free to post. :-D

    Swish

    Visual Basic

  • Build Errors on SQL Statement
    S Swisher24

    Thanks Colin but I've figured out another way to take the data from the datagrid into the database.

    Swish

    Database database help

  • Build Errors on SQL Statement
    S Swisher24

    First Off, I'm new to code project so if I post something thats already posted sorry. But I'm hoping to find someone who can help out with this build error that I'm receiving on an oledbadapter.insertcommand. I'm loading data into a datagrid for review. After reviewing the data I'm using a sub procedure to load the data into the database from the datagrid. "oledbadapter.InsertCommand(Insert Into table1 from )" error(s): (249): Comma, ')', or a valid expression continuation expected. (249): Property access must assign to the property or use its value. I'm having problems figuring out what to put after the "from" statement. If this is not enough information just let me know and also let me know if I'm posting this right with out being irate about it.

    Swish

    Database database help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups