|
TexasTornado wrote: After changed OS version, my applications run wrong cause of regional settings(date ,time and currency formats). Is it possible to fix the bug without recoded entire application source?
I doubt it. You haven't posted any code samples, but it sounds like you wrote your code without any regard for the culture it's running under. For example, you may have used your own custom formatting strings and used the Format overloads that don't take a IFormatProvider object to provider culture information.
There's no little "switch" that's going to fix that for you. It's going to take a complete code review to add in culture tolerance into your application.
|
|
|
|
|
I have created a stored procedure in MS SQL Server. It worked well there, but I want to call it from my vb application by sending a parameter to get the result from the database. Who can tell me how?
Thankz
|
|
|
|
|
|
Nine_ wrote: Who can tell me how?
Did you mean: How do I do this?
If I answer "Who can tell me how?" then my answer would have to be "I can" - but that is not very helpful to you. Is it?
The SqlCommand object has a Parameters property. You just need to Add your parameters to it.
e.g.
cmd.Paramters.Add("@SomeParameter", someValue)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
I would just like to add, that for .NET 2.0 the Add method has been deprecated and the method AddWithValue should be used instead (with the same parameters).
|
|
|
|
|
szukuro wrote: I would just like to add, that for .NET 2.0 the Add method has been deprecated
That is not entirely true. Only one overload of the Add method has been deprecated. The remaining overloads are acceptable.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
|
Hi,
I am returning many rows from my SQL statement, and there are only 2 colums. How do I add these columns to an ArrayList for each row?
Regards
ma se
|
|
|
|
|
Look, an ArrayList can only have one column...
But in btw, why do you want to put in an arraylist...
|
|
|
|
|
Typcially, an object that is represented by a row in your database is represented by a class or struct in your code. So, you create a collection of that object.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi,
I am developing a client server application where I need to generate a report in Excel (instead of Crystal Reports.NET). The formatting and other cell attributes need to be controlled through my VB.NET code.
What is it that I have to do?
Vinod
|
|
|
|
|
Hi Vinod,
One possible way to go: create an excel file (in Excel) with the formatting the way it needs to be. Open the excel file with .NET Studio. It will show you the file in xml form, including the necessary information concerning the formatting. Then use your code to manipulate the xml file's formatting and fill in the tags that you want. In the end save the xml file as .xls, and you are done.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi Johan,
What is the process of opening this Excel file in .NET studio. Seems a pretty dumb question but how do I do that?
Vinod
-- modified at 7:21 Friday 8th June, 2007
|
|
|
|
|
Hi Vinod,
Not a dumb question, I forgot to mention that you need to save the file as xml (spreadsheet) in Excel. Then you simply use open file in visual studio. In other words you open the file as an xml file. In your code it is then very simple to save the file again as .xls
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I have migrated an application from vs 2003 to vs 2005.Everything works fine,but when i create the installation setup and deploy the application on some other machine and try to generate crystal reports i get an error "Absolute Path information required".Also when i installed the same setup on the machine on which visual studio is installed the reports are generated.
I have added all the merge modules.All the pre-requisite to the application.The database bounded to other forms is getting accessed.One more thing i would like to tell you is that even when i create new repot and new report viewer control on new form,create setup and instal the setup same problem is there.Everything works fine except reports.I'm really bugged up with error.
Let me tell u what all things i tried.
1.Adding all the 4 merge modules.
2.Changing the installation path.
3.Given TableLogOnInfo
4.Giving the absolute path during report load.for ex. crpt1.load
(Application.startuppath & "\Reports\abc.rpt")
5.Tried Changing the registry programfilesdir .
6.Create New report in the same application with new form containing new
reportviewer control.
7. I tried to modify the overridable property ResourceName abc.vb (crystal report
file).But then i get error "Unable to locat resource i the manifest"
Following is the code on the Reportviewer Form
Friend Sub UserList(ByVal strSql As String, ByVal Headers As String)
Try
Dim objRptUserLog As CrystalDecisions.CrystalReports.Engine.ReportDocument
objRptUserLog =new CrystalDecisions.CrystalReports.Engine.ReportDocument
objRptUserLog.load(Application.startuppath & "\Reports\rptUserlog.rpt"))
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
For Each tbCurrent In objRptUserLog.Database.Tables
Dim oLIInfo As CrystalDecisions.Shared.TableLogOnInfo
oLIInfo = tbCurrent.LogOnInfo
With oLIInfo.ConnectionInfo
.ServerName = DatabaseConnection.GetServerName 'SETTING SERVER NAME ,UID,PWD,DATABASE
.UserID = DatabaseConnection.GetUserID
.Password = DatabaseConnection.GetPassword
.DatabaseName = DatabaseConnection.GetDatabaseName
End With
tbCurrent.ApplyLogOnInfo(oLIInfo)
Next tbCurrent
CR.DisplayToolbar = True
Dim crFormulas As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinitions = Nothing
Dim crFormulaTextField3 As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinition
Dim strDate As String
crFormulas = objRptUserLog.DataDefinition.FormulaFields
crFormulaTextField3 = crFormulas.Item("Header")
strDate = Headers
crFormulaTextField3.Text = "'" & strDate & "'"
CR.SelectionFormula = strSql
CR.ReportSource = objRptUserLog
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
If anyone has come across this problem before and solved it please help me.I tried searching on different sites but did not get any help as such.Please help its very urgent.
Thanks & Regards,
Manoj Bandgar
|
|
|
|
|
Hi guys,
When i tried to run the same setup on a new machine everything worked fine.Even the reports got generated and in the desired format.
On the previous machines where i installed my application and reports didn't get generated, i tried to uninstall all the components including dot net framework and reinstall them but of no use same error "Absolute Path information required" is repaeted.
Regards,
Manoj Bandgar
|
|
|
|
|
hi,
the pcs on which the crystal report was showing errror of "Absolute Path information required",i removed windows os and reinstalled it.Now everything is working fine.Even crystal reports are getting generated properly.I think some components must not be getting updated.
|
|
|
|
|
Is there a tool to generate VB code from a .REG file. I know I can import bulk registry keys with running REG IMPORT or creating the code manually. Although the latter works fine for a few settings, I would like to have bulk settings done from within the code.
|
|
|
|
|
Not that I've ever seen.
There are external utilities that will import the .REG file for you though, like RegEdit[^], of course.
|
|
|
|
|
hi i'm doing a final project, which need to send sms to the customer regarding its status.. can anyone pls tell how am i suppose to send sms from pc using vb.net 2003
|
|
|
|
|
Try this article: Send Text Message
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
thank you a lot matrix coder.. that helped a lot
|
|
|
|
|
HI
Previously my project was having the Version=0.30.0.0 of the dll IKVM.GNU.Classpath now i am trying to include or refer Version=0.34.0.3, of the same dll and its throwing me this error and i a m just not able to run the project. The dll is in the bin\debug folder of the project from where i was referring it earlier and now also. Plz Help! I am getting this error.
Could not load file or assembly 'IKVM.GNU.Classpath, Version=0.30.0.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Regards
|
|
|
|
|
Basically, it looks like you tried to replace the .DLL file with a new version, then just ran your project. That doesn't work.
You have to remove the references from your project to that .DLL, then add a new reference to the new version of the .DLL.
|
|
|
|
|
Thanks Dave!
No, i am doing that only.. removing the reference from the project and then, adding new reference of the dll with different version.(I am not replacing the dll file only, I am also changing the reference also) just could not what is the problem...
Regards
|
|
|
|