|
I'd say 7, but you're trying to change the subject here.
|
|
|
|
|
PIEBALDconsult wrote: reflect on the word "interface".
ecafretni? I doubt that'll help him much
|
|
|
|
|
That's ancient Sumatran - it means only public methods. It comes from a time when sacrifices were common place and there was a need to appease the gods by performing the sacrifice in public. They tried it in private for a while, but the populace started to suspect that all the pigs they were bringing to be sacrificed were just ending up as a really great luau.
|
|
|
|
|
What about an abstract base class instead of an interface? There you can use something like protected abstract void MyMethod();
|
|
|
|
|
Hi
I am trying to install SQL SERVER 2005 on my laptop witch has Win7 64 bit.
I tested all versions (Standard,Enterprise,SQLSERVER2000,and...)But when open the SQlServer and want to connect, a message is shown with "Login failed to 'My user'...".
Can you tell what is the problem?
And also when i install SQL2000 in Service Manager>>Server combo Box, there is nothing to select and when i write my PC Name the Services combo box show SQl Server and is stared, but when you want to start SQl Server Agent it shows "Access denied"Message.
Thank you.
CanI
|
|
|
|
|
Roya Rayane wrote: Can you tell what is the problem?
Is the server running?
If yes then you have a configuration/connection problem and nothing else.
If you want to connect from a different box then you must use the configuration tool to set that up.
|
|
|
|
|
Uninstall it, install it, install SQL Server SP3, and it should run the provisioning tool when you're done that gives your user the correct permissions.
|
|
|
|
|
Hi CanI
Before I also had the same problem as you, and the solution was to install SQL Server 2005 SP3.
One more thing, do not forget to run the SQL Server, type in the search box "service" and will open a window where to look for "SQL Server (SQLEXPRESS)", right click and start.
It's all
|
|
|
|
|
Hi,
Hope this is the right place to post this issue. If not, please let me know the correct place.
I've an excel sheet, where I have both table structure and table data. I need to write a macro which generates two different files (one for create statement and one for insert statement). To give more details,
ExcelSheet1
SNO COLUMN Data Type Remarks
1 Award_Id integer PK
2 AAI_ID Integer
3 Award_Short_Name varchar Abbreviated Award Name
AWARD_ID AAI_ID AWARD_SHORT_NAME
3000 2001 B.Tech
3001 2003 B.Tech
3002 2001 B.Tech
The macro for this excel sheet should generate, the below files
1. DEMAT_REQUEST.dat
INSERT INTO DEMAT_REQUEST(Award_Id, AAI_ID, Award_Short_Name)
VALUES (3000,2001,'B.Tech');
INSERT INTO DEMAT_REQUEST(Award_Id, AAI_ID, Award_Short_Name)
VALUES (3001,2003,'B.Tech');
INSERT INTO DEMAT_REQUEST(Award_Id, AAI_ID, Award_Short_Name)
VALUES (3002,2001,'B.Tech');
2. DEMAT_REQUEST.sql
CREATE TABLE TXN_DEMAT_REQUEST
(
Award_Id INTEGER(20) NOT NULL,
AAI_ID INTEGER(10) NOT NULL,
Award_Short_Name VARCHAR(10) NOT NULL
PRIMARY KEY(Award_Id)
};
Thanks alot in advance
|
|
|
|
|
I don't think we have a forum for Excel, so I suggest you try posting in the general Questions & Answers section.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
|
Ho to convert binary to hex in C#.
I have a byte array and I want to convert it into hex.
|
|
|
|
|
you can do it on this way
byte b = 15;
Console.WriteLine(b.ToString("X"));
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
|
The convert class can also be used for this:
Convert.ToString(number, base)
where base can be 2 (binary), 10 (decimal) or 16 (hexadecimal).
|
|
|
|
|
Thanks for your reply.
If you just convert it as you have shown it Eliminates the "0".
Say for example you have to convert 0000111111111000 into Hex.So it will show FF8 instead 0FF8
Well I was able to over come that by doing following:
string MyBinary = "0000111111111000";
string MyHex = String.Format("{0:X4}", Convert.ToInt32(MyBinary, 2));
|
|
|
|
|
When I need padding I use the string.PadLeft method. A couple of functions like this are all that's needed.
public static string ToHexString(int value)
{
return ToHexString(value, 0);
}
public static string ToHexString(int value, int bytes)
{
string result = Convert.ToString(value, 16);
if (bytes > 0)
result = result.PadLeft(bytes * 2, '0');
return result;
}
|
|
|
|
|
int b = 15;
string s=b.ToString("X8");
I advice to always specify the width you want; padding zeroes will be prefixed when necessary.
|
|
|
|
|
Hi!!
Its good to be back...
I'm working on a simple client server program... server waits for connection and client sends request for connection sort of... simple...
On the same m/c
but when i start my program... it hangs... it displays all msgs and then hangs.. doesnt respond to anything... then i start my client it connects to the server but server aint responding... i'm using windows forms in place of console app as per tutorials... plz help me...
should i attach my code here???
|
|
|
|
|
Have you got a firewall enabled?
Attach snippets of your client and server code so we can see what you're doing.
|
|
|
|
|
check your server call back function is correct or not..,
i think that is the problem, that's way you are able the receive the data for very first time of each new client.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Whats hanging? The server or client application?
Are your listeners and tcp stuff in seperate threads or just running on the UI thread?
Are you using blocking or not blocking methods?
You really need to give us some code to look at here...
|
|
|
|
|
you should not execute blocking calls on the main thread; either use asynchronous methods, or better yet apply proper threading. There are some CP articles on threaded client-server systems.
|
|
|
|
|
Is the listener running in its own thread? It should be.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
This is the complete source code for my server side program... on clicking the button it calls func conn_man.. on clicking it this program hangs...
b4 clicking it.. the program is responding n i can move it resize it n stuff.. but after the button is clicked its not responding.. plz.. tell me how to get it working..
on receiving the connection from client it searches for a free port on the server it self.. when found it sends the client the free port to connect to[ function route does it]..
master_slave is another form which is called on accepting a connection from client
<pre>
namespace master
{
public partial class main_form : Form
{
public int port;
public main_form()
{
InitializeComponent();
activity_win.AppendText("Master On...");
}
public void conn_man()
{
try
{
//activity_win.AppendText("In conn_man...");
IPAddress ipAd = IPAddress.Parse("192.168.1.2");
// use local m/c IP address, and
// use the same in the client
/* Initializes the Listener */
TcpListener listener = new TcpListener(ipAd, 5000);
/* Start Listeneting at the specified port */
listener.Start();
activity_win.AppendText("\r\nThe server is running at port 5000...");
activity_win.AppendText("\r\nThe local End point is :" + listener.LocalEndpoint);
activity_win.AppendText("\r\nWaiting for a connection.....");
Socket s = listener.AcceptSocket();
activity_win.AppendText("\r\nConnection accepted from " + s.RemoteEndPoint);
byte[] b = new byte[100];
int k = s.Receive(b);
activity_win.AppendText("Recieved...");
activity_win.AppendText(ASCIIEncoding.ASCII.GetString(b));
if (route(5000) == 0)
{
activity_win.AppendText("No port free");
ASCIIEncoding asen = new ASCIIEncoding();
s.Send(asen.GetBytes("Busy"));
}
else
{
port = route(5000);
new master_slave(port);
ASCIIEncoding asen = new ASCIIEncoding();
s.Send(asen.GetBytes("Port " + port.ToString()));
}
/* clean up */
s.Close();
}
catch (Exception e)
{
activity_win.AppendText("Error..... " + e.StackTrace);
}
}
public int route(int port)
{
try
{
TcpClient scnr = new TcpClient("localhost", port);
return port;
}
catch (Exception e)
{
activity_win.AppendText(e.ToString());
port += 10;
route(port);
return 0;
}
}
private void Begin_Click(object sender, EventArgs e)
{
conn_man();
}
}
}
</pre>
|
|
|
|