|
nicetohaveyou wrote: i am working in a VB Access application where a Business Object is used.
You're going to have to explain this a bit more to get an answer. What's a "Business Object"?? Is this a VB6 or VB.NET app with an Access database as a backend?? Or is this an app written in Access with VBA code??
nicetohaveyou wrote: whenever i launch the appllication it gives me error on Business Object.
Standard question #1: "What is the error message"?
nicetohaveyou wrote: How does it actually works?
Do i need to download the business object from somewhere?
You haven't told us what "Business Object" is, so how can we tell you how it works?? Got a link to this library or control you're using?? Searching for "Business Object" is a little pointless considering how generic the name is.
|
|
|
|
|
i have tried to use 3 layers
Presentation Layer,business Logic Layer, Data Access Layer
Just i Have tried,tell whether this is correct or not?
In My Presentation Layer
i have two textbox one for UserName and other for password
Private Sub btnSubmit_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.ServerClick
Try
Dim cus As New UserBLL
cus.UserName = txtuser.Value.ToString
cus.UserPass = txtPass.Value.ToString
cus.Verify()
Catch ex As Exception
Response.Write(ex.Message.ToString())
End Try
End Sub
In My business Logic Layer
Public Property UserName()
Get
Return user
End Get
Set(ByVal Value)
Try
Me.user = Value
If (Me.user = "") Then
Throw New Exception("Please Provide The User Name")
End If
Catch ex As Exception
Throw New Exception(ex.Message.ToString)
End Try
End Set
End Property
Public Property UserPass()
Get
Return pass
End Get
Set(ByVal Value)
Try
Me.pass = Value
If (Me.pass = "") Then
Throw New Exception("Please Provide The Pasword")
End If
Catch ex As Exception
Throw New Exception(ex.Message.ToString)
End Try
End Set
End Property
Public Sub Verify()
strReturnfromDAL = UsrData.Verify2("user", "pass")
End Sub
In Data Access Layer i Have
Public Function Verify2(ByVal str As String, ByVal str2 As String) As String
If str = "user" And str2 = "pass" Then
Return str + "" + str2
End If
End Function
In above i have tried to get a concept but i think i am not in correct way and
i need a result like verfying the user name and password and return back to BLL
i am not getting any error but i am not able to get the value of verify function to prsentation layer.
sathimailin
-- modified at 7:21 Tuesday 16th October, 2007
|
|
|
|
|
You obviously don't have a data layer here at all.
Your 'business layer' is using exceptions to pass information that should exist in the presentation layer.
You plainly don't need to call ToString on a Text property, it's a strng already
Having the username and password as members makes no sense at all, you want to pass them in and get a result, you don't want to store them
sathimailin1 wrote: Try
Me.user = Value
If (Me.user = "") Then
Throw New Exception("Please Provide The User Name")
End If
Catch ex As Exception
Throw New Exception(ex.Message.ToString)
End Try
What is this in aid of ? Make sure you catch the only exception that can be thrown, and rethrow it ?
This is all a mess, throw it away and start again. Get a database and write a proc which returns true is a username/password combination is valid. Return true or false from the BL, whch just calls the proc. Do all your rendering/generating of messages in the PL
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 )
|
|
|
|
|
Thanks Christian Graus
I will try with procs and i will post again to get the answer whether correct or not
sathimailin
|
|
|
|
|
Hi Christian Graus,
i Have reposted my doubt after making modifications again today .
sathimailin
|
|
|
|
|
Hi experts,
I m basically fighting wid a prb for writing data in a physically opened excel file. Is it possible to write in cells of the excel which is physically open ?
If so, pls guide me how can i implement it ?
Thanks.
|
|
|
|
|
No, it's not. You have two problems. First, the file is already open, so any changes you make will be destroyed when Excel save the file.
Second, the Excel file format is binary and VERY complex, up to Excel 2003. You cannot just open a file for binary access, write to it, and call it a cell in Excel.
In Excel 2007, the file format changed to an open-spec XML format, which is basically a text file. But, you still can't write to a file opened as ShareDeny by another application.
|
|
|
|
|
Hi All
Am Deploying my Application, Everything is ok,Excluding the Following.
When i Designed the User interface, i want to use my Picture in the Banner of the Installation Wizard. i went to User interface, and i Added a Picture and Build it. when i test my User interface, i see my Pic in the Banner, that is Correct , but there are Some text behind it. How can i remove those Text. i looked at the Properties of User interface , there are only 3 options, one for the Picture Banner, second for the text that appears at the bottom, and other that appear above the Botton text. i want to Remove the one at the Banner.
Thank
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi
Is there any controls in VB.Net similar to File upload control in ASP.Net
Regards
Sivan.G
|
|
|
|
|
There's an OpenFileDialog, but there's nothing to upload a file. The File upload control in ASP.NEt is just a wrapper around an HTML input control. The difference is, your browser already is sending data to a client, so it's easy to send a file. There are classes to do this in Vb.NET, but you need to set up your own network connection to send the data over.
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 )
|
|
|
|
|
Hi
I have two DataGridViews that have the same number of cells. I need each DataGridView to scroll when user scrolls the other one.
|
|
|
|
|
DGV2.FirstDisplayedScrollingRowIndex = DGV1.FirstDisplayedScrollingRowIndex
DGV2.FirstDisplayedScrollingColumnIndex = GV1.FirstDisplayedScrollingColumnIndex
|
|
|
|
|
hi,
I need to open,process,close multiple file streams (dynamic, i don't know how many will it be)
I have a array() as fileStream
And I have filled that array with fileStream, that I can do. but how to access each and every one of the files and do some work on it. And then close all fileStreams in that array.
I have figured it out only how to create them. Using this code
For i = 0 To numOfFiles - 1
stream = New FileStream(fileListing(i), FileMode.Open, FileAccess.ReadWrite) ' FileListing is a string array containing paths of the files
file(i) = stream
Next
Thank you!!
|
|
|
|
|
This isn't the way I'd do it, but all you have to do is access the methods and properties like this:
file(index).Read
If it were me, I'd probably wrap this file functionality in a class designed to work how you want it. The class would open the file, do any operations you want on it, and then manage closing the file when done.
|
|
|
|
|
Hi,
I am using some formatting tools in my project. So instead of creating a new one can iget the fromatting tool kit from MS-word or MS-powerpoint into my project. This formatting tool is nothing but the bold,italic,underlined...alignment etc.I need this very urgently. I'l be really greatful. Can you please help me in this regard
VIPUL
|
|
|
|
|
Please give me some idea about your requirement in brief.
Dot Net Provides lots of the methods and propeties for the same
Best Regards,
Chetan Patel
|
|
|
|
|
Hi Chetan,
Thanks for the response. I am doing this porject in VB6.0 I am preparing a s/w for entering quesions in the question bank. So when the question is being typed or entered it may need some formattng like bold,italics,(nothing but normal word formatting). so wanted to know the code which can get me the Microsoft (word,excel,ppt) formatting tool into my project. Instead of i creating seperate buttons 4 every formatting tool.
Vipul
VIPUL
|
|
|
|
|
You want a control to give you buttons that say bold, italic, etc ? How are you rendering this text ? Or are you hoping to use Word as a text box over and over in your project ?
A rich text box supports these things, but not buttons, you have to add those.
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 )
|
|
|
|
|
Hi ,
Thanks for the response. I am doing this porject in VB6.0 I am preparing a s/w for entering quesions in the question bank. So when the question is being typed or entered it may need some formattng like bold,italics,(nothing but normal word formatting). so wanted to know the code which can get me the Microsoft (word,excel,ppt) formatting tool into my project. Instead of i creating seperate buttons 4 every formatting tool.
Not another command button..the entire formatting tool kit from other MS application should come into my project
VIPUL
|
|
|
|
|
What you want is insane. Why are you using VB6 anyhow ?
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 )
|
|
|
|
|
You can't get just the toolbar. Those tools will only work on a Word document. You have to host Word inside your application to use that toolbar, and you'll have to show the rest of Word too so the user has a Word document to work on.
If you're going to go that far, why would the user even use your application??
vipul2 wrote: Instead of i creating seperate buttons 4 every formatting tool.
What's the problem?? Why not?? Why are you complicating your app more than it needs to be??
|
|
|
|
|
Hi Dave,
Yes i got it. So it is clear that i can't just the tool bar but instead i can get the entire word in my project which is't required.
Anyways thanks for the suggestion
VIPUL
|
|
|
|
|
Hi All,
I am writing a non MFC Application using Opengl (Win32 Project) but i am using
some MFC Headers below
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxdhtml.h>
#include <afxdlgs.h>
////////////////////////////////////////////////////////////////////////
I want to use Web Browser Control On my project (Activex) but i am not
using any form i want create web browser using createWindow function
////////////////////////////////////////////////////////////////////////
It will be really help full if anyone please send me sample code
Thanks,
Soumyadipta De
|
|
|
|
|
What would possess you to ask this in the VB forum ?
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 )
|
|
|
|
|
hi!
i have a simple question.
i have a simple server client program that i am recently doing my question is how do you queue the data from the client in the server side?
tnx!
FUNGAS!
|
|
|
|