I'm developing vb.net application with mysql as database. The database is on other machine in the network. In one function connection opens and executes query successfully. The same function makes call to other function.This second function tries ot do same thing. But this time while opening connection it gives error-"Access denied for user 'root1'@'AZAR' (using password: NO)". Here 'AZAR' is the name of my machine. The first function uses public variable declared in module for connection, whereas second function uses local variable for connection. I'm using PhpMyAdmin tool.
I am very new to SQL and do not understand as much about the language as I had hoped I would after a couple months of looking at it. I am creating a procedure database for work where we store word documents of procedures in a folder and use that to populate our database. I've been getting connection errors because I didn't realize I was trying to use the server.CreateObject command with an Apache DB and then using the connection string with an SQL Server DB. I am using SQL Server 2008 and I just ahd no idea why it wasn't connecting because I had been googling most errors.
When connecting to a Sybase ASE database via ODBC using the code below, I'll occasionally get a '[IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed' error. this be caused by my code? I read here that I should be using the 'With' statement instead, but I don't understand how that would affect this.
Finally starting some coding in VB.Net, I notice over the years, that we can say (in VB6)
Code: Dim MyForm_Stock as NEW frmStock
in the same session, being able to open, say 3 Stock Forms at the same time and maintain details independently of each of the other forms. Also am I able to maintain separate Database connections and the same table being opened and updated independently of each other by each separate form. What is actually taking place in terms of memory being used by each process? My ultimate goal is to be able to have ONE Module with all the possible data Connection and Recordset Opening and closing options, which I have failed miserably to do in my VB6 experience. Data access is an obvious module based set of subroutines. Others could be Date routines eg, Week Number of the year, Days Diff, Days to, etc. [Code]
I have made a PRN file using the "Print to file" option, and now I want to make a VB.net application that will print it directly to a TCP/IP printer which is not currently installed on the computer. Is it possible to achieve this by simply opening a connection to the printer's IP and sending all the bytes of the PRN file to it, or is it more complex than that?
I have a simple scraper. It works on some websites, but on some there is this Error:
Quote:
IOException was unhandled Unable to read data from the transport connection: The connection was closed
It is occuring at "Dim htmlresults As String = Urlcontents.ReadToEnd()".
'Create the HttpWebRequest object Dim req As HttpWebRequest = WebRequest.Create(URL) 'Set the timeout to 1 second (or 1,000 milliseconds) req.Timeout = 10000
This will happen at random, and I can always just catch the error and re-establish connection to the server, but I am confused as to why. When doing lots of inserting into the sql server, I only establish one connection that is public, instead of many little connections. I had my doubts on a public sql connection, but it's been running great, and I've seen no problems until this morning. Again, this random moment I hit an error that stated, sql connection state is broken. Is it bad practice to just accept this error, and when it happens, re-establish the connection?
I am creating a simple email application which sends mail from a user's Gmail account, as I haven't worked out how to receive incoming mail yet.I have created a form (frmSignIn) which asks for the log-in info and another (frmComposeMessage) which has all text boxes necessary for composing an email (to, subject, message body).After clicking Sign In on the first form, it should hide it and open the second form, however I get this error:
System.InvalidOperationException was unhandled Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
i have two tabs one is expiry date and block. my problem is, when i click block tab for 1st time it will correctly populate the datagridview. but when i click expiry date tab then block tab again, i got this error 'Provided column already belongs to the DataGridView control.'
I've developed simple selection program which is now complete and in testing. The program has been sent to several users that have all experianced the same error when they run the program.T
PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 4.0.30319.1
I cannot open and read files larger than 32k. This sub is used by both user-dialog and drag-drop operations. Files smaller than 32k are processed without error. Files greater than 32k result in the ErrorOpenFile warning with "Overflow" as the err.Description being displayed.
Public Sub SendFile(ByVal sendFileName As String, terminalWindow As Form) Const MSG_TITLE = "Send File" Dim asciiCode As Byte
I'm receiving an error I can't seem to figure out. I'm opening an image to Photoshop and the highlighted line is the cause. The file opens but closes automatically straight away.[code]...
The program i'm running doesn't seem to open the database in stead I get this error:"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"ErrorCode=-2146232060Is there a way to fix this error.
We have created a dll to convert an excel spreadsheet to a csv file. At the moment we open the xls file, an eror occured (file doesn't exist / is used by an other user)
Used Dim excel As New Microsoft.Office.Interop.Excel.Application Dim wb = excel.Workbooks.Open("d:my.xls") '<<<<<<<<<<< not possible to open wb.SaveAs("d:my.csv", Microsoft.Office.Interop.Excel.XlFileFormat.xlTextMSDOS) wb.Close(SaveChanges:=False)
Dim excel As New Microsoft.Office.Interop.Excel.Application() Dim wb As Microsoft.Office.Interop.Excel.Workbook = excel.Workbooks.Open(txtFileLocations.Lines(w)) Dim ws As Microsoft.Office.Interop.Excel.Worksheet = TryCast(excel.ActiveSheet, Microsoft.Office.Interop.Excel.Worksheet)
when the program tries to opens an excel file, it always throws me an error "Office has detected a problem with this file. Editing may hard your computer" and my program crushes.......The problem appears on the SECOND line, on DIM wb...blahblah.. i went to the office and unclicked the "protected view" checkboxes.. but it still throws me those errors. my guess is that the office i have in the computer is not the same as the one that my program uses to open excel files (i mean, i loaded/imported some excel.dll files in the program so i guess that will be the one) But how do i make the program not care if the excel file is "potentially dangerous"?
when the program tries to opens an excel file, it always throws me an error "Office has detected a problem with this file. Editing may hard your computer" and my program crushes. The problem appears on the SECOND line, on DIM wb.
We have created a dll to convert an excel spreadsheet to a csv file. At the moment we open the xls file, an eror occured (file doesn't exist / is used by an other user)
Used code: Dim excel As New Microsoft.Office.Interop.Excel.Application Dim wb = excel.Workbooks.Open("d:my.xls") '<<<<<<<<<<< not possible to open wb.SaveAs("d:my.csv", Microsoft.Office.Interop.Excel.XlFileFormat.xlTextMSDOS) wb.Close(SaveChanges:=False)
I'm trying to open an Excel file to get and set some values. Unfortunately, I have no choice, I must to work with Excel.
Dim xAp As New Microsoft.Office.Interop.Excel.Application Dim xWkb As Microsoft.Office.Interop.Excel.Workbook
xWkb = xAp.Workbooks.Open("c:uploads este.xls")
Always I have this exception: (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
Need I Excel installed in server machine to open Excel files? I don't think so, because when I create a new application and workbook throught code, all things go right, but... its a possibility...
I am having problem in opening and viewing data in my SSCE table. There are 3 tables in it, two are working fine but one is causing trouble. I dropped the table and created a new one (same name) but again, the problem is the same.Please see the problem message below: