|
the user account being used is the Administrator account.
|
|
|
|
|
In that case, that's about as far as you can take it. It woujld appera that the function is just not going to work properly from a service.
|
|
|
|
|
'Remaining Text Does Not appear to be a part of the Formula'
getting this error when passing String Data from Vb.net form to Crystal report in VS 2008 , numeric value works fine
this is the code which i am using to pass the value to Formula Field
objReport.DataDefinition.FormulaFields(0).Text = "Company_Name ='" & gCompany_Name & "'"
|
|
|
|
|
Can you put a breakpoint/debug statement/watch on that line and tell us the value of the variable gCompany_Name ?
I are Troll
|
|
|
|
|
|
Error in Formula <ID>.
'Company_Name ='Company Name"
The reamining Text Does Not appear ......
|
|
|
|
|
I'm not using Crystal myself, but could this be a quote-mismatch?
'Company_Name ='Company Name"
How about this?
Company_Name = "" & "Company Name"
I are Troll
|
|
|
|
|
hi experts
i have created one application in vb.net c# and i add new item form2
and i want to set form2 for debug but only form1 is debug when i run this application i want to set from2 for debug
|
|
|
|
|
Set Form2 as start-up form?
|
|
|
|
|
paya1pa wrote: i have created one application in vb.net c#
What?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
paya1pa wrote: i have created one application in vb.net c#
You are therefore a genius. Stop programming, and start doing lectures, writing books, etc.
It's not possible to write an app in VB.NET AND C#, unless the languages are seperated through dlls.
paya1pa wrote: and i want to set form2 for debug but only form1 is debug when i run this application i want to set from2 for debug
Not true. If you debug, you debug the whole application. Perhaps you need to explain more, because nothing you've said makes any sense.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ok, so I should know this but I just do not know how to create a global variable in VB.NET i am more used to programming in VB6 and am still adjusting to .NET, so I need to ask how do I create a global variable?
I understand that it would be placed after the Public Class (project name) line but then how Would the syntax be for creating a global variable??? I also already know that I should try to not use global variables but I just am writing a very simple program so dont worry I do know that Global variables sometimes are not the best to use.
Thanks.
|
|
|
|
|
Well, for starters, global variables are nearly always bad. But, if you need one, it's just a shared variable ( which is the same as static in C# ). The difference is, it needs to exist in a class, you can't just create a variable in space somewhere. Other than that, it's the same thing. The keyword is 'shared', not 'static' in VB, and I don't know enough VB to give it to you beyond that, but if you google VB.NET shared, you should find examples.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Okay so I looked it up on google but didn't find any good examples of the syntax for global variables in VB.NET
i am trying to do this:
Public class Invest '(invest being my project name)
'then create a global variable, as Christian said I tried using the shared function but still dont know the proper syntax
Shared Dim iCount as Integer = txtAge.text
I know the line of code i just posted is incorrect but I dont know the proper syntax for declaring global variables
can someone tell me what I am doing wrong???
|
|
|
|
|
Does VB.NET really magically turn your textbox text into an int ? What happens when it fails, does it throw an exception ? VB is so nasty.
I found this with google:
Public Shared ReadOnly Property DBName() As String
Get
Return "FunnyNumbers_DB_for_the_auditors_only"
End Get
End Property
I presume the readonly is optional. I also assume you can use the same syntax for variables as for properties.
A shared variable is initialised when the program starts, I believe. At a minimum, you can't know when it is initialised, so you can't know what the value of txtAge.text will be when it is initialised. I assume you have only one instance of this textbox, you should handle the lost focus or text changed events to update this value.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You really shouldn't be creating "global" variables in the first place. If you do, it's a sign that you may have a problem with your class structure and are violating encapsulation rules.
Public Class MyGlobals
Shared Public someVar As Integer
End Class
And to get at it's value:
MyGlobals.someVar = 30
You would also be advised that it's better to wrap the variable in a Property to control access to the variable and do validation on any set attempts.
|
|
|
|
|
|
Can I overload the System.DateTimeOffset class so that I can write either:
dim d = now.date 'existing
or
dim p = now.mynewproperty 'overloaded by me
Thanks
|
|
|
|
|
You can derive a class from any class you like. I believe you can also use extension methods to add a method to a class, but I've never done that.
To add - you'd need to override the Now property to return an instance of your new class, if you wanted to add a property to the Now property.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Please if anyone could offer me help on this, I need to know how to invoke a dopostback in the web browser control in visual basic. My idea is that I want to capture data from a website (authorized) that is using asp.net server. The website has a dropdownlist that postbacks according to the value chosen and shows the value (that i need to capture).
If anyone could Help , I would appreciate it
THanks
|
|
|
|
|
Hi everyone,
I have a datagridview with 3 columns "Name", "Age", "salary".
While displaying in datagridview, I hide the "Age" column and display only the two column using this code:
DataGridsearch.Columns("Age").Visible = False
Now I have written one code for ClickRow event of datagridview, in which when user clicks any row, the content of the cells get displayed into the respective textboxes for "Name" and "Salary". The code is like this:
Dim row_click As Integer
row_click = DataGridView.CurrentRow.Index
name.Text = DataGridView.Item(0, row_click).Value
salary.Text = DataGridView.Item(2, row_click).Value
Now, i am able to display both "Name" and "Salary" in its respective textboxes, from datagridview, but not able to display the "Age" in its textbox "age.Text".
Can anyone tell me how to do this, since I have already hide the "Age" column while displaying in datagridview?
|
|
|
|
|
You need to use VB equivalent of this C# code. DataGridView.Rows[RowIndex].Cells[ColIndex].Value.ToString()
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi,
I didn't get how to implement this as I have hidden 1 column. Can i get some help on this more?
|
|
|
|
|
I wrote an application in VB 2003 which used the "SqlClient.SqlConnection". I used standard connection code;
ConnectionString="workstation id=MySys;packet size=4096;data source=MySQL;User ID=RP;PASSWORD=RP;initial catalog=Inventory"
cnData.ConnectionString = ConnectionString
Try
cnData.Open()
Catch
MsgBox("Data Source could not be opened.")
Exit Sub
End Try
and it worked fine. I opened it in vb 2008 and it performed the conversion without any reported errors, but it will no longer connect?
MySys is a separate Development system and MySQL is another system on my LAN running SQL Server 2000.
I have been to www.connectionstrings.com[^] but after trying numerous things, nothing helped. Any ideas?
modified on Saturday, September 26, 2009 1:20 AM
|
|
|
|
|
Found the answer, it appears I had to add the Network Library to get this to work!
ConnectionString=Workstation ID=MySys;packet size=4096;Data Source=MySQL;User ID=RP;Password=rp;Initial Catalog=Inventory;Network Library=dbnmpntw
That must have been assumed in VB 2003?
|
|
|
|