|
check for the existance of the registry key for excel.applicaion:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00024500-0000-0000-C000-000000000046}
before calling the code to create the Excel.Application object.
If the key is present, it should beok to open exel, if not just skip.
|
|
|
|
|
Need to write VB code to save application DataBases (Access) to another location of the users choice. Need help coding using SaveFileDialog control. Thanks.
Gib5531
|
|
|
|
|
|
Help, i face this error message
System.Data.OleDb.OelDbException:IErrorInfo.GetDescription failed with E_FAIL(0x80004005) at system.Data.OleDbCommand.ExecuteCommandTextErrorHandling(Int32hr)....
|
|
|
|
|
Means nothing to me. What were you doing at the time?
|
|
|
|
|
i have rename the tablename name and attribute name in the database.When the function call the database then it prompt out the error message.
i totaly no idea about it.
|
|
|
|
|
Without seeing the code that throws this error and knowing which line it fails on, it's pretty much impossible to tell you what happened.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The error show at the code that i have bold it.
Dim dsSession As New DataSet
Dim sqlQuery As String = "SELECT * FROM Session ORDER BY SessionID"
Try
Dim adpStudent As New OleDbDataAdapter(sqlQuery, Connection)
adpStudent.Fill(dsSession, "StuTable")
If dsSession.Tables("StuTable").Rows.Count > 0 Then
Dim dsRow As DataRow
'clear the array list Students.clear()
For Each dsRow In dsSession.Tables("StuTable").Rows
SessionID = dsRow("SessionID")
SessionName = dsRow("SessionName")
SessionCategory = dsRow("Category")
SessionFee = dsRow("Fee")
aSession = New Session(SessionID, SessionName, SessionCategory, SessionFee)
Sessions.Add(aSession)
Next
Else
MsgBox("No record in database")
End If
dsSession = Nothing
Catch ex As Exception
MsgBox(ex.ToString)
End Try
|
|
|
|
|
There doesn't appear to be anything wrong with the code, but you left off the code that opens the connection to the database, including the connection string.
Other than that, it would appear that you have a problem with the database itself. Either you don't have the appropriate permissions to database objects required to fill this SELECT request, or the database is corrupt, which if it's an Access database is entirely possible (not so much for an SQL Server database).
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
yes,i'm using access. i have rename the one table inside it, i think this cause the error. thanks, i will check for my database.
|
|
|
|
|
Your code didn't say anything about renaming a table. If you renamed the table in the database, but didn't update the code to get it's information from the table using its new name, then of course your code is going to fail!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanks, i have check my access database. Yup it is the database problem.
|
|
|
|
|
dont ask stupid questions
Mohamad A. Flefel
C#.net Developer
|
|
|
|
|
good advice
Tamimi - Code
|
|
|
|
|
I am currently working on a data import application that will write a file to a SQL database table. I need to write a function that will pass two parameters: partnumber and format style to format the partnumber. Need ASAP!
jds1207
|
|
|
|
|
jds1207 wrote: I am currently working on a data import application that will write a file to a SQL database table. I need to write a function that will pass two parameters: partnumber and format style to format the partnumber. Need ASAP!
If I were you I would start writing it, then. The sooner you start, the sooner you'll finish.
If you run into any problems with it, you are very welcome to post a question here in the message board.
Good luck.
---
b { font-weight: normal; }
|
|
|
|
|
jds1207 wrote: I need to write a function that will pass two parameters: partnumber and format style to format the partnumber.
A function to do what?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
A function that will format the file part number based off format code.
|
|
|
|
|
Which means what? Geez - You're not helping much are you. You need to help us to help you. Explain what you want to happen.
|
|
|
|
|
That doesn't mean anything. The file get's it's format when you write it and how you write it. I still have have a clue what you're trying to do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
How to show Tooltips for a control when it’s disabled?
Thanks
|
|
|
|
|
IIRC, ToolTips are disabled along with the control. I don't know of a method to get around this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear All,
I have a problem, I have a DLL that runs a Recieve Thread for USB communications. I am calling the DLL from VB 2005. It all works (openUSBComms function, and recieve data using a Callback). However When I call the closeUSBComms function from the FORM CLOSING event my program hangs.
In side the DLL, the Close Functions Sets a 'Death' Event and Waits for the Thread to terminate using WaitForSingleOject.
When I call the dll closeUSBComms funciton from a Button event say, all is well and the Thread Terminates, But when I call it from the Closing Event of the Form the WaitForSingleObject doesn't return and the Thead doesn't terminate.
Any Ideas why ?
I have access to both the VB and the DLL source code and can change either. But preferably not the DLL unless really have to.
Adrian
|
|
|
|
|
Hi Everybody,
i have created the project in VB.Net using visual Studio 2005.But when i try to run in setup file in client it asks to install .net framework 2.0.
So how to automatically intall the .net framework 2.0 at the time of run my project setup wihout user interaction
Thanks for Advance Help
|
|
|
|
|