|
Change first letter to upper of datareader in your if condition.
.<br />
.<br />
.<br />
if ((UserName == Dr[0].ToString()) & (Password == Dr[1].ToString()))<br />
{<br />
<br />
boolReturnValue = true;<br />
<br />
}<br />
.<br />
.<br />
.
I Love T-SQL
|
|
|
|
|
How to handel this(The channel 'tcp' is already registered.) Exception in remoting
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Can you a bit more specific, what are you trying to do?
|
|
|
|
|
i am working on remoting (server, clinte, object) first time when i conect clinte to server then its work properly. ofter that whn i diconect the ser clint and again try to connect client to server then its give error(The channel 'tcp' is already registered) without closing the application. if i close the application and again try then it work properly.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
ok still properly didnt understand but maybe you should try automatically closing the app after each connection
|
|
|
|
|
problem is that without closing the apllication i conect and disconect on buttum then it give the error
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
maybe close the app on the button instead
or can you psot some of your code so we can see what is happening
|
|
|
|
|
CLient
Dim serverProv As New BinaryServerFormatterSinkProvider
serverProv.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim clientProv As New BinaryClientFormatterSinkProvider
'Dim props As IDictionary = New Hashtable
props = New Hashtable
props("port") = 0
RemoteChannel = New TcpChannel(props, clientProv, serverProv)
ChannelServices.RegisterChannel(RemoteChannel, True)
RODemo = Activator.GetObject(GetType(RemoteObject.DemoObject), "tcp://localhost:40011/Test")
Dim mRemoteObjectEventHelper As New RemoteObject.RemoteObjectEventHelper(RODemo)
AddHandler mRemoteObjectEventHelper.RemoteStatusObjectEvent, AddressOf HandleTheEvent
Server
BotCollection = New Collection()
Dim serverProv As New BinaryServerFormatterSinkProvider
serverProv.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim clientProv As New BinaryClientFormatterSinkProvider
'Dim props As IDictionary = New Hashtable
props = New Hashtable
props.Remove("port")
props("port") = 40011
RemoteChannel = New TcpChannel(props, clientProv, serverProv)
ChannelServices.RegisterChannel(RemoteChannel, True)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(RemoteObject.DemoObject), "Test", WellKnownObjectMode.Singleton)
RODemo = Activator.GetObject(GetType(RemoteObject.DemoObject), "tcp://localhost:40011/Test")
RODemo.Initiator = "Server"
Dim mRemoteObjectEventHelper As New RemoteObject.RemoteObjectEventHelper(RODemo)
AddHandler mRemoteObjectEventHelper.RemoteObjectEvent, AddressOf HandleTheEvent
AddHandler mRemoteObjectEventHelper.RemoteSDObjectEvent, AddressOf ShutHandleTheEvent
AddHandler mRemoteObjectEventHelper.RemoteStatusObjectEvent, AddressOf FindBotStatusEvent
AddHandler mRemoteObjectEventHelper.RemotegetStatusObjectEvent, AddressOf getBotStatusEvent
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi peeps
I know loads of you have probably seen this error, or read about it before - so this shouldn't be a problem to answer.
I can connect and see my database (which is on my local machine) in Visual Studio (I am uing LINQ to connect and auto-generate entity classes). When I run my application it comes back with the dreadful error:
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Now I've done everyting you are supposed to do:
1) Ensured remote connections are enabled, enabled TCP and named pipes
2) Started Browser service
3) Restarted servcies and/or Rebooted machine
4) Windows firewall isn't running as I have Kaspersky - but i've put in exceptions for the processes; and even turned Kaspersky off.
No joy.
As Visual Studio can connect and view the database, i was wondering if there is anything I have to configure on the ASP.net side of things?
I should point out that I am running:
- Vis Studio 2008
- Sql Server 2005 Service pack 2
- Vista business (incidentally I had no problems with the same set-up on diff machine running Vista Ultimate)
|
|
|
|
|
I had this problem when I tried to connect from a server outside my local network to a server inside my local network
Are both the servers that are trying to talk to each other inside the same network?
Can you ping the address of the server you are trying to conenct to?
|
|
|
|
|
morning mate,
Yeah its all on my local machine
I had the same error on a diff machine connecting to a remote db, but sorted that by using the correct connection string.
This time, vis studio auto gens the connection string, which works in the designer, but not at run-time.
Hmmmmmmm
|
|
|
|
|
Daniel Fowler wrote: This time, vis studio auto gens the connection string,
That would suggest that you need to write the connection string yourself, make sure all the basics are correct like username etc and also try using the name of the server instead of IP or viceversa
|
|
|
|
|
Yeah, I'll have to try that.
It's just funny how this worked without a problem on my other machine running Ultimate.
Damn computers, I knew I should have been a carpenter.
|
|
|
|
|
Hello all,
I am displaying a calender in pop window. I am having a form which is in user control and that form having calender control. I am using the user control on another page and the form get displayed.When user click on calender image a pop open and i am displaying calender control in pop up window.When user select a date then selected date will get displayed in text box. The problem is that when i click on a date in calender control then date will not get displayed in calender control and it gives following error.
Error: window.opener.document.forms[0].txtdelivdate has no properties<br />
Source File: http:
Line: 48
when i find out the cause then i found that user control dosenot have form tag so it gives the error. when i add the form tag in user control then it shows error.
a page can have only one form tag
because the page on which i am displaying user control having form tag. I cant remove the form tag on my aspx page. So how can i solve the error.
i am adding folowing code for adding on calendr selected index changed event to add calender selected value to text box.
Dim strScript As String = "<script>window.opener.document.forms[0]." + control.Value + ".value = '"<br />
strScript += calDate.SelectedDate.ToString("MM/dd/yyyy")<br />
strScript += "';self.close()"<br />
strScript += "<br />
RegisterClientScriptBlock("anything", strScript)</script>
Please help me.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Does the View Source show txtdelivdate as it is or is the name mangled?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
No is shows as it is? if i put the textbox and image on the same page it running properly. But it is in user control so at that time it gives above error in javascript console.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi, in my application i have 3 master pages, in the child page, i need to am call one javascript function on page load, for intialize some values, i have used "Register client script", but there is no use, can one pull me out?
Thanks & regards
Murty
|
|
|
|
|
dwadasi wrote: but there is no use
Can you quantify the situation? Are you getting any errors? Do you see the script emitted as part of the HTML?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Use RegisterStartupScript rather than RegisterClientScript.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
currently i m using ASP.NET with C# (.net 2005, 2.0 framework).
Please find the below coding.........
string[] color = new string[] {a,b,c};
foreach (string i in color_parameters)
bg_color(i);
The bg_color() is of.....
public void bg_color(TextBox txtbox_name)
{
................
...............
}
here, when i m trying to pass value to bg_color() "cannot convert from 'string' to 'System.Web.UI.WebControls.TextBox'" error is occuring. how to resolve it?
thanks in advance........
modified on Wednesday, April 30, 2008 5:41 AM
|
|
|
|
|
try
<br />
public void bg_color(TextBox txtbox_name)<br />
{ <br />
txtbox_name.Text = stringvalue;<br />
}
I Love T-SQL
|
|
|
|
|
i would like to convert the "i" value to TEXTBOX.. how to achieve it?
as i mentioned the bg_color() function will receive only TEXTBOX. but the parameter we passing is STRING. so , how to convert STRING to TEXTBOX?
|
|
|
|
|
Are you looking for something like this:
<br />
public void bg_color(TextBox txtbox_name)<br />
{ <br />
string stringvalue = txtbox_name.Text;<br />
<br />
}<br />
<br />
string[] color = new string[] { "a", "b", "c" };<br />
foreach (string i in color)<br />
{<br />
TextBox txt = new TextBox();<br />
txt.Name = i;<br />
txt.Text = i;<br />
bg_color(txt);<br />
}<br />
<code> <br />
<br />
<div class="ForumSig"><hr><small> <font color="Green">I Love T-SQL</font></small></hr></div><br />
<div class="ForumMod">modified on Wednesday, April 30, 2008 5:09 AM</div>
|
|
|
|
|
Something like .ToString() or Convert.ToString(textbox i )
maybe something like that
|
|
|
|
|
no .netman..... i tried many.. but i cant get the answer.. help me.... thanks for ur understanding
|
|
|
|