Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Thursday, 22 July 2021

Can Not publish aspx pages Visual Studio ( GatherAllFilesToPublish )

 

Visual Studio 2019
This week I had an issue with Visual Studio 2019 professional where my web project would not upload to the web sever. the error was to do with GatherAllFilesToPublish.

I did all the usual things and looked at all the solutions on  the web and came up blank for my problem. so I asked a colleague if he had seen this error before, he said uninstall all the versions you have on your machine ( I had 3) and reinstall. So reluctantly i went through the process of uninstalling each version i had.

I then did a reboot to get rid of all the rubbish and reinstall VS2019 , then came the setting up. That done i tried a tentative publish of the site and bingo all was now correct no error.


Happy coding


 

Thursday, 7 February 2013

Error Creating Data Table


Hi All just thought i would post this as i have just spent a bout an hour trying to work out why it would not work in my current project.

I have a  a function to create a data table and return it.


Public Function SQL2DataTable(ByVal sql As String)
        Dim SqlCon1 As String = "Data Source=sprintsql;Initial Catalog = database ;Integrated Security=SSPI;"
        Dim dt As New DataTable
        Dim da As New SqlClient.SqlDataAdapter(sql, SqlCon1)
        da.Fill(dt)
        da.Dispose()
        Return dt
    End Function

This is called like this

Dim dt As DataTable = SQL2DataTable(sql)

 now in this instance this would not work and came back with the error

    Unable to cast object of type 'System.Data.DataTable' to type 'Excel.DataTable'.

After a lot of frustration i found it was cause by having Imports Excel  declared at the beginning  Hope this saved you some time.


Multi Point USB Charger

  USB Plug Charger, 4-Port USB Fast Charger Plug with 33W Intelligent Quick Charge 3.0 Wall Charger, Multi USBPower Adapter UK Fast Charging...