|
If you can connect via the IP address but not using the DNS name, then it would seem to indicate you have an issue with you machine not being able to resolve the DNS. Contact your network people.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i can access the sqlserver using the server name in my local system
in my system there is no sqlserver installed and
when i upload the page and run it on browser then it does not work.
|
|
|
|
|
This is a classic example of why you should not refer to your servers by IP address, if the network guys reconfigure your network, boom ! Your applications break.
Let the network guys do their thing, let the developers do theirs.
I'm getting off my soapbox now.
|
|
|
|
|
While I agree that server names are better, I have had just as much trouble with Network guys F* up the DNS requiring the use of IP Addresses instead as the more reliable solution. There has been a noticeable increase in lazy sys-admins.
|
|
|
|
|
as u said,i given the server name instead of ipaddress
like this
con = New SqlConnection("Network Library =DBMSSOCN; server =server1ABN; database = dvk; user id = sa; password ="";timeout = 60")
but i get this error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
all configurations are enabled to Sqlserver.
only a ipadress of the server is changed.
if ipadress of the server is changed then do we have to reconfigure the sqlserver with new ipadress
from the past 1 week the website is running properly
now the same server is configured with a new ipaddress
This problem occurred with the changing of ipaddress
can u help me
|
|
|
|
|
Is it the same server or are you pointing to a new server? If it is a new server make sure it is configured to accept TCP connections and not just named pipes if you are going to specify the network library. Are you sure there are no firewalls in between your web server and SQL server that could be restricting traffic on port 1433?
Oh and by the way NEVER EVER EVER EVER use the sa account.
|
|
|
|
|
Hi Guys Good Morning,
I have 3 Dataset like this,
First Dataset Records,
Code Value
1010 68.876
7887 189.89
456 1880.76
1010 223.978
Second Dataset Record
IV
7.88
Third Dataset Records,
Code Name IndCode
1010 Name1 1
7887 Name5 2
456 Name8 3
Now thses 3 dataset merge and i need the final dataset like this...,
Name finalValue Percent(finalvalue/IV)
Name1 292.854 37.16 (Code-1010,Value-68.876+223.978)
Name5 189.89 24.10 (code-7887,value-189.89)
Name8 1880.76 238.68 (code-456,Value-1880.76)
How to get the final dataset like this
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I don't understand what you are trying to do but if you just require to achieve this, then follow these steps:
Add a Table to the new DataSet.
Add Columns to the Table.
Assign these columns to the corresponding columns. Something like
NewDataSetObject.Tables[0].Columns[0] = DataSet1.Tables[0].Columns[0];
I would rather recommend you to explain your scenario and answer these questions:
Where are these data coming from? Why have you taken one DataSet for 1 Table?
Why are you creating another DataSet when you can assign a DataSet, containing these Tables, as a DataSource ?
..Go Green..
|
|
|
|
|
Hi all,
I want to ignore negative while sorting a generic array list.
eg. If list contain following values
0.3
0.2
-0.3
after sofrting it should values should be in following order
0.3
-0.3
0.2
Any solution guyz.
Thanks in advance.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Write a class that implements IComparer .
public class myComparer : IComparer
{
public Boolean Descending;
#region IComparer Members
public int Compare(object x, object y)
{
Double obj1 = (Double)x;
if (obj1 < 0) obj1 = -(obj1);
Double obj2 = (Double)y;
if (obj2 < 0) obj2 = -(obj2);
if (Descending )
{
if (obj1 < obj2 )
return 1;
if (obj1 > obj2)
return -1;
}
else
{
if (obj1 > obj2 )
return 1;
if (obj1< obj2)
return -1;
}
return 0;
}
#endregion
}
Pass a object of your custom class in ArrayList.sort method
ArrayList arr = new ArrayList();
arr.Add(0.3);
arr.Add(0.2);
arr.Add(-0.3);
myComparer objComparer = new myComparer();
objComparer.Descending = true;
arr.Sort(objComparer);
modified on Monday, August 30, 2010 5:31 AM
|
|
|
|
|
you can do some thing like this
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
List<decimal> lstIntCol = new List<decimal>();
lstIntCol.Add(0.3M);
lstIntCol.Add(0.2M);
lstIntCol.Add(-0.3M);
lstIntCol.Sort(new decimalComparer());
foreach (decimal d in lstIntCol)
{
Response.Write(d.ToString() + "--");
}
}
}
public class decimalComparer : System.Collections.Generic.IComparer<decimal>
{
#region IComparer<decimal> Members
public int Compare(decimal x, decimal y)
{
return decimal.Compare(Math.Abs(y),Math.Abs(x));
}
#endregion
}
|
|
|
|
|
When i insert pdf file in database through OLEDB from c sharp asp dot net. and
retreive pdf through OLEDB from c sharp asp dot net then pdf show properly in browser
but when i insert pdf file sqlanywhere 11 database through OLE from power builder 12
and retreive pdf through OLEDB from c sharp asp dot net then pdf show error that
file does not begin with '%PDF-'.
PLEASE HELP ME AS SOON AS POSSIBLE REGARDING THIS MATTER
|
|
|
|
|
Tengo el mismo problema, encontraste la solución?
|
|
|
|
|
I use an access db with my website(.mdb file). I try to run 3 standard sql INSERT, DELETE and UPDATE statements. When I run the website locally on my computer it works great with no problems, but when I upload the website to the server and try to run the SQL statements I get 2 exceptions:
for the Insert statement:
System.Data.OleDb.OleDbException: Operation must use an updateable query.
for the Update statement:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
for the DELETE statement:
System.Data.OleDb.OleDbException: Could not delete from specified tables.
I have to mention that the rest of the site works well with no special problems, including the pages where I read from the db tables by executing sql SELECT statements
|
|
|
|
|
benams wrote: I have to mention that the rest of the site works well with no special problems, including the pages where I read from the db tables by executing sql SELECT statements
It's seems you are having problem with the Writable operation as your "Read" operation working properly and "Insert", "Update", "Delete" is not working.
Please make sure that, In Web Server, you are having (In which credentials your application is running ) proper rights to write access on DB Server.
Hope this will helps !!
|
|
|
|
|
thanks for reply..
how can I check it? (I'm using flashfxp in order to access the server and upload the site's files)
|
|
|
|
|
can anyone guide me to get a asp.net job in UK.
|
|
|
|
|
Look here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Kindly avoid posting this kinda post in Programming forum. Might be you can try Lounge or so.
|
|
|
|
|
Hi Coders
I need to integrate paypal payment gateway in asp.net(C#). I want to use IPN method to get know the transactionId, payment status purpose.
I use sandbox account for this.I made the transaction successfully but it not give me IPN Message(querystring) which have complete detail like txn_id,status etc.I researched over it from last 3 days.
Do any provide a source code or sample application for this.
Thanks in advance
Amit
|
|
|
|
|
You should have searched the CP articles first. Check this[^] out.
|
|
|
|
|
|
Hello everyone,
I am trying to practice regarding OOP. I got a code from internet
public class StoreIndexViewModel
{
public int NumberOfGenres { get; set; }
public List<string> Genres { get; set; }
}
as I am beginner, I am trying to develop code in the way I learn.however it is not professional way.
this is my code regarding above code
namespace TestProject.ViewModels
{
public class StoreIndexViewModel
{
public int _numberofgenre;
public List<string> _genres;
public int Numberofgenre
{
set { _numberofgenre = value;}
get { return _numberofgenre; }
}
public List<string> Genre
{
set { _genres = value; }
get { return _genres;}
}
public StoreIndexViewModel(int numberofgenre,List<string> genre)
{
this._numberofgenre = numberofgenre;
this._genres = genre;
}
Could you please tell me did I write correct code?
thx for your help.
modified on Saturday, August 28, 2010 8:00 AM
|
|
|
|
|
future3839 wrote: Could you please tell me did I write correct code?
Correct in what sense? If it compiles, it is syntactically correct. You can check that yourself. If it does what you want it to do, it is logically correct, may not be the best/optimum logic though.
I think you should describe what do you mean by correct.
Anyways, here are a few things that you may consider:
1. If you are using .Net 3.0 or above, make use of automatic properties.
2. You can make use of XML comments and regions in stead of commenting using "//".
3. You can make your fields private and have them only when it is really needed.
4. No need of having "this" keyword unless really needed.
5. Make use of Generic lists or Collection since they are strongly typed.
modified on Saturday, August 28, 2010 11:14 AM
|
|
|
|
|
future3839 wrote: //definition of Fields
public int _numberofgenre;
public List _genres;
Your field definition need to be private . You have public accessors.
|
|
|
|