Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

I want Export Excel for Miccrosoft office 2003

$
0
0

my provider for office 2007

        If FileUpload1.HasFile Then
            Try
                Dim Path As String = String.Concat(Server.MapPath("~/Files/" + FileUpload1.FileName))
                FileUpload1.SaveAs(Path)
                Dim exlconn As String = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=Excel 8.0", Path)

                Using oconn As OleDbConnection = New OleDbConnection(exlconn)
                    oconn.Open()
                    Dim dx As DataTable = oconn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
                    Dim query As String = "select * from [Sheet1$]"
                    Dim ocmd As New OleDbCommand(query, oconn)
                    Dim odr As OleDbDataReader = ocmd.ExecuteReader()


                    Using conn As SqlConnection = New SqlConnection(c.Readconnectionstring())
                        conn.Open()
                        While odr.Read
                            Dim desc As String = odr(0).ToString()
                            Dim no As String = odr(1).ToString()
                            Dim sqlq As String = "declare @id int ; " & _"exec @id = ctgetNextID 'Items',@id; " & _"insert into items(item_itemsID,item_desc,item_ItemNo,item_Companyid) values(@id, @desc ,@no,'" & Request.QueryString("idvar") & "')" & _"exec item_proc @id "


                            Using scmd As SqlCommand = New SqlCommand(sqlq, conn)
                                scmd.Parameters.Add("@no", SqlDbType.NVarChar, 50).Value = no
                                scmd.Parameters.Add("@desc", SqlDbType.NVarChar, 50).Value = desc
                                scmd.ExecuteNonQuery()
                            End Using
                        End While
                    End Using


                End Using

                Dim dt As DataTable = c.findg(Request.QueryString("idvar"))
                Gvitems.DataSource = dt
                Gvitems.DataBind()
            Catch ex As Exception
                Lblerr.Visible = True
                Lblerr.Text = ex.Message
                Lblerr.ForeColor = Drawing.Color.Red
            End Try
        End If

 Dim exlconn As String = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=Excel 8.0", Path) -> this Provider for excel 2007

I want Provider for work 2003

my CRM (Sage system) on the server cannot run ACCESS version 12.0 

please help me 


Viewing all articles
Browse latest Browse all 1350

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>