|
Dim r, fs, w As Object
fs = CreateObject("Scripting.FileSystemObject")
r = fs.OpenTextFile(m_strIniPath, 1)
|
|
|
|
|
Is there anybody out there who could help me please.
I am trying to make use of the Transactionscope to implicitly create a transaction. This transaction should roll back when a condition is not met. It doesn't seem to work for me even though i have started the msdtc service. My function inserts a row in an oracle database using the DI.CreateTemplate. Now i want it to roll back the insert when the Attach_ID_To_Invoice_Batch process is not sucessful.
Dim DI As New DataLayer.Invoice
Dim intRetVal As Integer = -1
Dim options As New Transactions.TransactionOptions
options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted
Try
Using scope As Transactions.TransactionScope = New Transactions.TransactionScope(Transactions.TransactionScopeOption.Required, options)
'If Not IsDoumentAllocated(EntryID) Then
intRetVal = DI.CreateTemplate(oTemplate, strTemplateName, enumTemplateType, UserID, -1, -1, "")
If intRetVal <>0 Then
If Attach_ID_To_Invoice_Batch(intRetVal, EntryID) Then
scope.Complete()
Else
intRetVal = -2
End If
Else
intRetVal = -1
End If
'End If
End Using
Catch ex As Exception
Return intRetVal
End Try
Could somebody please go through this code and let me know what i am missing.
|
|
|
|
|
Could anyone helpme out with nunit testing -
i ve put all the required dll's and all the references are added.
but while testing - it gives error - system.data.sqlclient.sqlexception - SQl server does not eexists or access denied
modified on Monday, December 10, 2007 8:03:37 AM
|
|
|
|
|
Have you set your connection string properly?
|
|
|
|
|
ritika wrote: Could anyone helpme out with nunit testing -
i ve put all the required dll's and all the references are added.
but while testing - it gives error - system.data.sqlclient.sqlexception - SQl server does not eexists or access denied
Sounds like you either have the wrong username, password and/or hostname or don't have a connection string setup like our other friend said.
By the way, you may want to go with a shorter subject next time. The whole point of having a subject is to give people the "Short" version of the problem, not the whole problem!
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
By default and for security reasons, when you install SQL Server 2005, it cannot be accessed from computers other than where it is installed. You have to explicity allow this. To do it:
1. In your Start Menu, find "SQL Server Configuration Manager"
2. In the SQL Server 2005 Services node, find SQL Server Browser and ensure it is running and starts automatically.
3. In SQL Server 2005 Network Configuration, find the instance you want to allow (probably MSSQLSERVER) and enable TP/IP.
You'll probably have to restart SQL Server.
|
|
|
|
|
Hello,
I built for my latest application a GUI based on MFC menus, buttons, dialogs, etc..., using Visual C++.
It has a little bit of old-fashion look though I slowly upgrade it using graphic buttons with mouse-hoover beheviour.
I wish to change completely the look to a more fashion look. I do not know clearly what I want : I just wish to improve the look.
I wonder what would be the right tool for that, whatever the option I take : redesign completely the GUI or upgrade it.
What about Java ?
What about .NET ?
Thanks in advance for any hint.
Jean-Marie
Professionnal Software developper
France
|
|
|
|
|
WPF[^] is the next generation GUI framework, but the designer support in Visual Studio isn't as intutive as a Windows Forms application.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks, Tom, for your help.
Actually, by a fashion-look GUI, I think of a web-style GUI, with graphical buttons, hoovering mouse behaviour,....
Is WinForms the good tool to use to achieve such effects ?
I currently use MFC only and I read somewhere that it is possible to integrate a WinForm into an MFC application.
Jean-Marie Epitalon
|
|
|
|
|
You can think of Windows Forms as the MFC of the .Net world. It has controls like ListView, TreeView, Button, etc. Which map to the same underlying windows controls as CListView, CTreeView, CButton, etc.
With the Windows Forms controls, you get the default Windows look and feel. As with MFC, you can custom draw Windows Forms controls or customize their feel.
WPF on the other hand is the next generation. For example, with the TreeView (in either Windows Forms or MFC) your nodes can generally have an image and text (and multiple levels of nodes). If you want to display another image (say to the right of the text), then you have to perform custom drawing to add the second image. With WPF, the tree nodes can contain pretty much any other control. So I could create a "custom control" that has a left image, text, and right image. Then use that custom control as a node. If I want to add a button to my nodes, then I can update my custom control to include a button, and all the nodes that use that control immediately get the button. WPF is extemely powerful and flexible.
You can also apply styling or themes to any or all controls to customize their look or feel. WPF does have a larger learning curve though, so it may be a bit much to start with.
Windows Forms and WPF are really best utilized if you are using a .Net language. I'm not sure how easy it would be to integrate into a MFC application, and honestly I wouldn't recommend it. But you posted in the .Net framework forum, so I'm assuming you want to start using .Net.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks, Tom, for your help.
Jean-Marie
|
|
|
|
|
Hello,
the C# compiler has a wonderful option that allows you to build your application
without referencing mscorlib.dll in order to write your own System namespace (/nostdlib).
I am making usage of this feature but I have a problem.
I created a simple application with this feature that implements some core classes (Object, Attribute, Int32, ValueType, ...) in order to build the project properly. It works fine.
The only problem consists in the fact that I can't create my own value types and use them e.g:
<br />
using System;<br />
<br />
namespace Test<br />
{<br />
struct MyValueType<br />
{<br />
}<br />
<br />
class MainClass<br />
{<br />
static void Main()<br />
{<br />
MyValueType val;<br />
}<br />
}<br />
}<br />
This will throw the following exception:
<br />
Unhandled Exception: System.TypeLoadException: Could not load type 'Test.MyValueType' from assembly 'Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nu<br />
ll' due to value type mismatch.<br />
at Test.MainClass.Main()<br />
I would be VERY pleased if someone helped me.
Thanks in advance.
Best wishes,
Klaus
|
|
|
|
|
Hello Friends,
Can anybody let me know how many languages and namespaces are supported by .NET 2.0
And also plz define "Type Safety"
|
|
|
|
|
The Knowledge wrote: Can anybody let me know how many languages and namespaces are supported by .NET 2.0
Try counting them.
The Knowledge wrote: plz define "Type Safety"
Google[^] not working where you live?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Where u live
if u don't want to suggest me the way don't ask for google
I know google is best search engine and provide no. of solutions......
But i could not get the best one...................
|
|
|
|
|
The Knowledge wrote: Where u live
None of your business.
The Knowledge wrote: I know google is best search engine and provide no. of solutions......
But i could not get the best one...................
Let me get this right. You couldn't find any information about the subject of Type Safety, even after being given a search link with the top hit being an article on the very same subject
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i think u didn't take my pro.
There r two question
1.) How many languages and namespaces are supported by .NET..........
2.) Explain "Type Safety".............
I got about "Type Safety" but not easily understood by me because i'm very new in this field................
Now this is my last reply to u if u want to suggest me the solutions to my prob. plz suggest me
otherwise don't reply and stop ur questioning.......................
|
|
|
|
|
The Knowledge wrote: i think u didn't take my pro.
I think I understand your problem.
1. You are incapable of reasearching the answers to simple questions.
2. When given links to articles that provide answers to your questions, you are incapable of reading them.
Reading documentation and undertaking your own research are basic competencies in the field of software development. Unless you acquire these skills, you will struggle to make a career as a developer. Anyway, Good luck!
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet wrote: "No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
Another Rush fan.
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Another Rush fan.
We get everywhere.
|
|
|
|
|
I assume you must have seen them on the Snakes and Arrows tours?
Kevin
|
|
|
|
|
I've seen them several times. If you look on the inside cover of A Show Of Hands[^], my right hand is visible (you can tell because my 6'5" mate stands out a bit and is highly visible). They recorded the album at Birmingham NEC on one night and filmed the video the following night. They are still one of my all time favourite acts.
|
|
|
|
|
Pete O'Hanlon wrote: I've seen them several times.
Ditto.
Pete O'Hanlon wrote: They recorded the album at Birmingham NEC
Which is where I saw them in October.
Pete O'Hanlon wrote: They are still one of my all time favourite acts.
Ditto. But when I mention Rush to colleagues I usually get one of two reactions:
1. Who are they?
or
2. Are they still going?
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Which is where I saw them in October.
I saw them at Newcastle Arena.
Kevin McFarlane wrote: Ditto. But when I mention Rush to colleagues I usually get one of two reactions:
1. Who are they?
or
2. Are they still going
I don't know how much longer they can continue giving the same level of energy to live shows. As he gets older, Neil Peart's drumming gets more and more amazing - Geddy Lee is still awesome (even with his voice having mellowed) and Alex is still one of my favourite guitarists. I still rate Red Sector A as one of the great all time rhythm guitar parts, it always brings a chill when I listen to it.
|
|
|
|
|
pmarfleet wrote: Unless you acquire these skills, you will struggle to make a career as a developer.
He won't be getting back to you. The village rang and demanded their idiot back.
|
|
|
|