|
Do you mean to make the stored proc like so ?
ALTER PROCEDURE [dbo].[Search_Licenses_By_Number]
@LicenseNumber int,
@CentralRegistryNumber int,
@LicenseNameArabic nvarchar(MAX),
@LicenseNameEnglish nvarchar(MAX),
@LegalForm nvarchar(MAX),
@ExpiryDate Date,
@LicenseOwner nvarchar(MAX),
@LicenseOwnerNationality nvarchar(MAX),
@LicenseType nvarchar(50),
@LicenseActivities nvarchar(MAX),
@LicenseAddress nvarchar(MAX),
@Phone nvarchar(20),
@Fax nvarchar(20),
@Email nvarchar(MAX),
@LicenseStatus nvarchar(20)
as
begin
Select LicenseNumber, CentralRegistryNumber, LicenseNameArabic, LicenseNameEnglish, LegalForm, ExpiryDate, LicenseOwner, LicenseOwnerNationality, LicenseType, LicenseActivities, LicenseAddress, Phone, Fax, Email, LicenseStatus from LicensesTbl
Where LicenseNumber = @LicenseNumber
End
|
|
|
|
|
No. Make the calling code only pass in one parameter.
This space for rent
|
|
|
|
|
its allreally calling one parameter
i have this code in data layer
Friend Function Search_Licenses_By_Number(ByRef cmd As SqlCommand, ByRef dr As SqlDataReader, ByVal LicenseNumber As Integer)
Dim retval As Integer
cmd = New SqlCommand("Search_Licenses_By_Number")
cmd.Parameters.AddWithValue("@LicenseNumber", LicenseNumber)
retval = dm.executeReader(cmd, dr)
Return retval
End Function
and this code in Business Layer
Public Function Search_Licenses_By_Number(ByVal LicenseNumber As Integer) As Integer
p.Search_Licenses_By_Number(cmd, dr, LicenseNumber)
Return p.Search_Licenses_By_Number(cmd, dr, LicenseNumber)
End Function
And in form button this code
Dim retval As Integer = p.Search_Licenses_By_Number(txtLicensesNumber.Text)
is it correct ?
|
|
|
|
|
any help ??
|
|
|
|
|
khalid4775 wrote:
i have this code in data layer
Friend Function Search_Licenses_By_Number(ByRef cmd As SqlCommand, ByRef dr As SqlDataReader, ByVal LicenseNumber As Integer)
Dim retval As Integer
cmd = New SqlCommand("Search_Licenses_By_Number")
cmd.Parameters.AddWithValue("@LicenseNumber", LicenseNumber)
retval = dm.executeReader(cmd, dr)
Return retval
End Function That doesn't match your earlier post which stated that you had this in your data layer:
Friend Function Search_Licenses_By_Number(ByRef cmd As SqlCommand, ByRef dr As SqlDataReader, ByVal LicenseNumber As Integer)
Dim retval As Integer
cmd = New SqlCommand("Search_Licenses_By_Number")
cmd.Parameters.Add("@LicenseNumber", LicenseNumber, SqlDbType.Int)
cmd.Parameters.Add("@CentralRegistryNumber", SqlDbType.Int)
cmd.Parameters.Add("@LicenseNameArabic", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseNameEnglish", SqlDbType.NVarChar)
cmd.Parameters.Add("@LegalForm", SqlDbType.NVarChar)
cmd.Parameters.Add("@ExpiryDate", SqlDbType.Date)
cmd.Parameters.Add("@LicenseOwner", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseOwnerNationality", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseType", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseActivities", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseAddress", SqlDbType.NVarChar)
cmd.Parameters.Add("@Phone", SqlDbType.NVarChar)
cmd.Parameters.Add("@Fax", SqlDbType.NVarChar)
cmd.Parameters.Add("@Email", SqlDbType.NVarChar)
cmd.Parameters.Add("@LicenseStatus", SqlDbType.NVarChar)
retval = dm.executeReader(cmd, dr)
Return retval
End Function Which is it?
Also you are passing in a string to your method, not an integer. txtLicenseNumber.Text returns a string - you will need to convert this to an integer before you call your procedure.
This space for rent
|
|
|
|
|
may you corrected for me pls ?
|
|
|
|
|
Yes; it's pretty evident you don't know your inputs from your outputs.
You should (re)start back at the basics and expand on that: retrieve a single scalar value from the database and display it; e.g. number of records in a certain table.
Once you got that working, try passing ONE parameter and returning ONE value; etc.
|
|
|
|
|
Hi,
I have the following code:
protected void Page_Load(object sender, EventArgs e)
{
MailMessage myMessage = new MailMessage();
myMessage.Subject = "Test Message";
myMessage.Body = "Hello world ";
myMessage.From = new MailAddress("you@example.com", "Sender Name");
myMessage.To.Add(new MailAddress("you@example.com", "Receiver Name"));
SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.Send(myMessage);
}
I put in web.config the following code:
system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="Your Name &lt;you@example.com&gt;">
<network host="smtp.example.com" />
</smtp>
</mailSettings>
</system.net></pre>
but the result fail to send email???
why???
|
|
|
|
|
|
You need a "real" SMTP / mail server to send to; including a user id and password for sending via that server.
Do you have an account with "smtp.example.com"?
|
|
|
|
|
|
|
Please help me build VB.NET Skype commercial Calls recording.
I Don't know much about SKYPE4COMLib
Imports SKYPE4COMLib
Public Class Form1
Public WithEvents skype As New SKYPE4COMLib.Skype
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Not skype.Client.IsRunning Then
skype.Client.Start()
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
skype.Attach()
MessageBox.Show("Succesfully Connected!", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information)
Label4.Text = ("Connected!")
Label2.Text = ("Welcome: " + skype.CurrentUserProfile.FullName)
Catch ex As Exception
MessageBox.Show("Unable to connect", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information)
Label4.Text = ("Disconnected")
Label2.Text = "Welcome: Unknown"
End Try
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
End Sub
End Class
|
|
|
|
|
You haven't spelled out any kind of problem at all. We have no idea what you need help with. Frankly, from the small code snippet you posted, it doesn't look like you have any idea what you're doing or what you're target application is even supposed to be doing.
|
|
|
|
|
That is why im asking a help... I don't know much about Skype commercial API.
|
|
|
|
|
You're NEVER going to get a tutorial on using the API in a forum. There's just too much information to convey.
Also, nobody is going to write your code for you. YOU have to do the research on this and YOU have to teach yourself how to use the API. What good would someone writing your app for you do? You still really wouldn't know how it works or why.
|
|
|
|
|
Please help me create simple. Skype commercial call recorder and save as .mp3 ..
|
|
|
|
|
|
Done with that.. But still no luck...
|
|
|
|
|
It is not a matter of luck.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Luck has nothing to do with it. You need to use your brain.
|
|
|
|
|
What's a "commercial" call?
Is that different from a "private" call?
How is it different?
|
|
|
|
|
hello. Looking for friends here.
|
|
|
|
|
The Term Papers wrote: Looking for friends here. OK. I'll tell them you're here. Please have a seat.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I fear it is the wrong place.
You'd rather try at the lounge.
The Lounge[^]
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|