|
Perhaps asking in the right forum ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all
i want to change the leftmost dimension of a two - dimensional array. but redim statement does not change the Left Most dimension. For example i declare a two-dimensional array as following
Dim WrappingItemInfo(0, 4) As String
after that i write following statement at particular condition
ReDim Preserve WrappingItemInfo(1, 4)
but above statement give error "'ReDim' can only change the rightmost dimension.".
so how can i change the leftmost dimension of an array ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
set WrappingItemInfo(1) to be a new array of four elements. This would work in C#, should work in VB.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir,
thanks for your response but i does not properly get you
can you explain it bit more with code(whether in c# or vb)
one more thing. in my previous post, i simply give a example. In real condition, Leftmost dimension of an array is increased every time by one when a particular condition is found.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
int [,] n = new int[5,5]();
n[0] = new int[5]();
something like that
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You should use a dynamic collection instead of an array, like a List(Of String()).
An array can't be resized, so what the ReDim command does is to create a new array, and copy all data from the old array to the new array. It can get pretty expensive as the array grows...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello
How i can let the user who use my application when he click enter
so the button1_click event is fire
Thank for your help
Assaf
|
|
|
|
|
Well, don't call it button1, for a start ( that's just dumb )
You have properties on the form for the AcceptButton and CancelButton. These set what buttons are pressed by Enter and Escape
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm sorry to ask this question on this form, it's an asp.net application
But Thanks for your help
Assaf
|
|
|
|
|
Ah... well, it's good to consider the forum you use, and how you word the question, so you can feel sure people will actually understand what you're asking.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi ALl
I have one windows based application in vb.net.
when i place one button named as "Report" on form,it appears perfectly at design time but when run this application,i have not seen "Report" button on my
form.
what happened excetly?
pls help me
Thanks
monika
|
|
|
|
|
Check Visible property of button it has to be true, to be sure of it you may also set this property on Form load event.
-Ajay.
|
|
|
|
|
Hii Monika
Just check the button Location,Size,Visible property.
else delete the button and re add the new button.
May be it solve your problem
Thanx
Mitesh Khatri
|
|
|
|
|
Good Morning All
i have the Following App.Config file in VB2003 and a Windows Application.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="timer.Enabled" value="True" />
<add key="timer.Interval" value="1000" />
<connectionstring>
<add name ="Tshwane_Train"
connectionString = "login=sde;Password=topology;Database=Tshwane_Valuations_Train;
Server=SGIICORNETGS01"/>
</connectionstring>
</appSettings>
</configuration>
and am Accessing this Connction string from the Vb App, like this
Dim constr As String = Configuration.ConfigurationSettings.AppSettings("Tshwane_Train")
When i compile the Application, i get no Errors ,but but when i try to run the application, i mean the Part that will need to Connect to the Database i get the Following Error.
An unhandled exception of
type 'System.Configuration.ConfigurationException' occurred in system.dll<br />
Additional information: Unrecognized element
What is Wrong
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You might try something like this:
connStr = My.Settings.ConnectionString
Works for me.
I don't speak Idiot - please talk slowly and clearly
|
|
|
|
|
hi man
Am i missing Something here, your My(.), intelisense does not recognise it, am creating a Windows Application. Are there any references that i missed ?
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
At First i saw my e-mail with this Code from you
Public Sub initializeDataConnection()
Dim strConn As String
Dim settings As ConnectionStringSettings
settings = ConfigurationManager.ConnectionStrings _
(WindowsApplication1.My.MySettings.APPProdConnectionString")
If Not settings Is Nothing Then
strConn = settings.ConnectionString
cn = New SqlConnection(strConn)
End If
End Sub
and when i click to go to CodeProject, i see a Different Answer, did you change it?
let us look at the above code, i understand what you are doing and in the Following line where you declare like this
Dim settings As ConnectionStringSettings
The ConnectionStringSetting is not recognised, am using VS2003 and VB(Windows App) is this Applicable to it?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Your app.config has a seperate section for connection strings. Have a google.
|
|
|
|
|
i have Resolved the Problem
like this, the App.Congif File looks like this
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="timer.Enabled" value="True" />
<add key="timer.Interval" value="1000" />
<add key="Tshwane_Train" value="User id=sde;Password=topology;Database=Tshwane_Valuations_Train;Server=SGIICORNETGS01"/>
</appSettings>
</configuration>
and am Accessing it from my code like this
Dim constr As String = Configuration.ConfigurationSettings.AppSettings("Tshwane_Train")
And its working
Thanks for your Answer
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
The "key" attribute (or node .. what is this thing anyway ?) does not have a connectiontring atrribute.
Use: <add key="keyname" value="value" /> and it should work...
you can skip the <connectionstrings> <connectionstrings /></connectionstrings> part too...
|
|
|
|
|
I am working in window based application
funFillCombo_prod(CmbProduct, "select productid,product from product_master where status=1")
CmbProduct.ValueMember = "productid"
CmbProduct.DisplayMember = "product"
CmbProduct.SelectedIndex = 0
In function I fill the combobox ……… by dataset
Public Function funFillCombo_prod(ByVal cmbCombo As ComboBox, ByVal strsql As String) As Boolean
Try
Dim intI As Integer
If con.State <> ConnectionState.Open Then con.Open()
GDataAdapter = New SqlDataAdapter(strsql, con)
GDataSet = New DataSet()
GDataAdapter.Fill(GDataTable)
cmbCombo.DataSource = GDataTable.DefaultView
funFillCombo_prod = True
Catch ex As Exception
MsgBox(Err.Source & " : " & Err.Description, vbInformation, g_MSG_Title)
funFillCombo_prod = False
Finally
GDataSet = Nothing
End Try
Exit Function
End Function
Private Sub CmbProduct_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbProduct.SelectedIndexChanged
If CmbProduct.Items.Count > 0 Then
If CmbProduct.SelectedIndex <> -1 Then
MessageBox.Show(CmbProduct.SelectedValue.ToString())
End If
End If
End Sub
Problem is that in CmbProduct_SelectedIndexChanged I want valumember of a combobox
But msgbox which I write in that event is giving me the desired o/p but problem is that…
For two times I got this message System.Data.DatarowView. then I got the valuemember which I require,
Please tell me how to solve this System.Data.DatarowView. Problem
|
|
|
|
|
soniasan wrote: Please tell me how to solve this System.Data.DatarowView. Problem
This means you have not set the ValueMember of the combobox, so it's showing the ToString of the object referred to
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Set the Datamember and valuemember property of the combobox.
|
|
|
|
|
Hi,
how to avoid creating temp file after run the exe. of window application.
why temp files are created after running the exe
Thanks!
|
|
|
|
|
Sorry, what temp files are you talking about?
Bob
Ashfield Consultants Ltd
|
|
|
|