|
|
I have a program linked to a Access Database and i would like to be able to hit a button on the form and open a report in that database in such a state to print it.
|
|
|
|
|
Are you asking if it can be done, or are you asking us to write the code for you?
______________________
stuff + cats = awesome
|
|
|
|
|
|
Hi:
I have created two dimensional 2 x 2 array, and assigned values for 3 elements of an array only which is shown in the following code. I was bit wondering what values will be stored in the rest of the elements of array. I assumed "nothing"
will be stored for them. But I got some exception handling errors. Can any help me?
My Code:
Dim s(2, 2) As String
Dim x As String
s(0, 0) = 1
s(0, 1) = 1
s(1, 0) = 1
x = s(1, 1)
If x.Equals("") Then
MessageBox.Show("Uninitialied arrray stored nothing")
End If
hsprasain
|
|
|
|
|
They will contain Nothing , or in C#, null .
|
|
|
|
|
Hey:
If they contain nothing, can you tell me why I'm getting unhandled exceptional error while running my code?
Dim s(2, 3) As String
Dim x As String
s(0, 0) = 1
s(0, 1) = 1
s(1, 0) = 1
x = s(1, 1)
If x.Equals(Nothing) Then
MessageBox.Show("The value of x is :" + x)
End If
|
|
|
|
|
probably because of this line:
MessageBox.Show("The value of x is :" + x)
you can't add/concat x because it is nothing. just say this:
MessageBox.Show("The value of x is : Nothing")
|
|
|
|
|
No. I tried what you have suggested but it showed me some exceptional handling errors.
The debugger is showing an error at:
If x.Equals(Nothing) Then<br />
|
|
|
|
|
Try:
If x = nothing Then
or
If x Is Nothing Then
|
|
|
|
|
Thanks man! It works well now.
|
|
|
|
|
Because in order to execute the Equals method on X, X actually has to have a reference to an object. It doesn't, so the exception, which you haven't told us anything about, should be "Object reference not set to an instance of an object."
|
|
|
|
|
|
Hi all,
How could i know Window is English version or Japanese version or Chinese version through vb.net code?
|
|
|
|
|
You can look at the current culture of the UI using:
Imports System.Globalization
.
.
.
Console.WriteLine("Current UI Culture: " & CultureInfo.CurrentUICulture.Name)
|
|
|
|
|
Hi,
I had a bit of a trawl through MSDN for this and I think this is what you want.
Click Here
The part you probably want to look at is...
"Use the LanguageDesignation property to return a three-letter abbreviation for the language used for the operating system. The following statement returns "enu" as the language designation abbreviation for the English (US) language.
currSystemLanguage = System.LanguageDesignation"
Let me know if this is of any use.
Regards
Guy;)
You always pass failure on the way to success.
|
|
|
|
|
That's not part of the .NET Framework. That's a FrontPage library.
|
|
|
|
|
oops - sorry
You always pass failure on the way to success.
|
|
|
|
|
I'm hoping this is an easy question. I am converting data from and reading specific strings and replacing certain characters with other characters.
For example, currently I'm replacing a & symbol with a | symbol using the following code.
dim strTest as string<br />
... load strTest with a value from SQL ...<br />
strTest = Replace(strTest, "&", "|")
The code above works fine. Now, my question is, what do I do if the string has a " symbol in it. I want to replace the " with a | symbol. The code would look like this, but of course the compiler doesn't like this syntax.
strTest = Replace(strTest, """, "|")
Single quotes don't work either because the compiler recognizes this as a comment. How do I code a double quote?
Thanks for any help
Lost in the vast sea of .NET
|
|
|
|
|
You need to use 2 double quotes to tell the compiler that this should be interpreted as part of the string.
strTest = Replace(strTest, """", "|")
|
|
|
|
|
This...
KreativeKai wrote:
strTest = Replace(strTest, """, "|")
should be:
<br />
strTest = Replace(strTest, """", "|")</blockquote><br />
|
|
|
|
|
Thanks to both of you. I tried out the logic and it worked!
Thanks again
Lost in the vast sea of .NET
|
|
|
|
|
Im using a grid box that has a date and time format in one of the Columns
Im trying to archive a populate
Using vb.net
I placed a grid box on the form
Then I placed 2 textboxes 1 combo box 2 date pickers
I did a data bind so that when I click on a row the combo box shows the record number (pk) Item no of that row clicked
Below that are the
Name (Text box)
Description (text box)
Start date (date pickers)
End Date (date(picker)
How do I populate the name , desc, stdate , endate fields by just using the Item.index of the combo box then just changing the field to update (Which I Know how to do)
Please assist me wilt the population I really think it is difficult because of the date time picker
|
|
|
|
|
Hi all
anyone can help me Please
i have some problem to transfer data from vb application to excel file
textbox value into excel cell. i open excel file by using shell command but after open file how to add data from vb application to excell without delete or replace previouse data.
here is shell coding.
Dim Book1 As String
Dim Directory As String
Dim Program As String
Directory = Book1
Program = "C:\Program Files\Microsoft Office\Office11\Excel.exe "
Book1 = (Directory & "\Export")
Shell (Program & Book1)
Thanks for advance
___________
Khan786
-- modified at 6:56 Thursday 21st June, 2007
|
|
|
|
|
The shell command is useless. You need to use the visual studio tools for office to control Excel from yuor code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|