|
this is simply a matter of using the correct connectionstring just point the data source part to the server: servername\sqlserverinstancename
example:
Data Source=server1\server1_DEV;Initial Catalog=DB;User ID=sa
then you can write you app like any other
If you'r question was how to write the app then you'r asking at the wrong place. Nobody here will write it for you, when you have a specific problem then you can ask for help here
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
|
1. Is the SQL server allowed remote connect?
2. Port blocked? Firewall?
3. And many many reason can cause it.
|
|
|
|
|
Thanks for your response.
What shd i do so that the client machine can allow to remote access.
Thanks once again
vandana
|
|
|
|
|
from the error I would think that you try to use you connection to the db before it has been initialized.
I'd debug the programme from the start and see where the connections with the db is made and where you first use it.
also check if the client can access the server by ip (just ping to the ip and see if it works)
next to that you have to give both the servername or ip and the sqlservername (usaly its the servername_dev)
so if you'r server has ip 1.1.1.1 and is named server and the database is named 'db' and you can login with user sa and pass sa then you'r connectionstring would look like:
Data Source=1.1.1.1\server_DEV;Initial Catalog=db;User ID=sa;Password=sa
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
I used same connection string as you told me but it gives error that
"An error has occured while establising the connection to the server, the failer may be boz the fact that under the default settings sql server does not allow remote connection"
What type of setting i will have to change so that the client would be able to connect with server remotely?
Thanks once again
vandana
|
|
|
|
|
I would first check the settings of sql server to see if it allows remote connection (like the error says)
then check firewall settings
networksettings
...
if the connectionstring is correct it must be something like the above
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Actully problem is that the sql server doesn't allow the remote access.
I have changed connection in the configuration wizard
the remote connection to Local and Remote connection from local connection only ,I have also tried to do it by creating server's alias but nothing happened
Can you tell me what shd i do for the remote access of sql server?
Thanks once again
vandana
|
|
|
|
|
Create Console Application in Visual Studio 2005 that prompts the user for a five digit positive integer, separates the number into individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should display at the command prompt
The separated digits of the input number are 4 2 3 3 9
liv2luv
|
|
|
|
|
use divided by (/) and modulo (%) in a loop and print them.
here is the techique for you.
divide the number by 10000.
then you will get 4.
print it and give 3 spaces.
then number=number%10000.
then divide it by 1000
and so on.
|
|
|
|
|
The easiest way to do this is to convert the number to a string, loop through each character in the string and add white space between each digit. The following code demonstrates how to do this:
int number = 12345;
string number_string = number.ToString();
StringBuilder output = new StringBuilder();
for (int i = 0; i < number_string.Length; i++)
{
output.AppendFormat("{0} ", number_String.SubString(i, 1));
}
number_string = output.ToString().Trim();
Paul
|
|
|
|
|
Nothing like doing someones homework for them.
Congratulations!! You've now helped this person fail his class!!
I know this may seem like an odd thing to say, considering he'll use YOUR code to pass HIS little assignment. But, since HE didn't write the code, HE will have LEARNED NOTHING that he MUST LEARN in order to write code for FUTURE projects.
Again, congratulations on helping him fail...
|
|
|
|
|
I think you should calm down a bit. People help each other for free on this site, and I am as entitled to offer assistance as anyone else. If you think this person is posting homework then take issue with him, not me.
Also, please don't shout at me. The forum guidelines forbids it.
Paul
|
|
|
|
|
pmarfleet wrote: If you think this person is posting homework
You didn't read the OP's subject line, did you? "academic problem" screams homework.
Think about the help you're giving and why the person is asking for it before you post. Are you going to tell someone how to write a virus too?
|
|
|
|
|
Even if it was a homework question I don't think that justifies the tone of your response, which was out of proprtion to the issue at hand.
Anyway, people who cheat eventually get found out, so I don't think it makes much difference in the great scheme of things.
Paul
|
|
|
|
|
Dave Kreskowiak wrote: Nothing like doing someones homework for them.
What a cheat
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Dave Kreskowiak wrote: Again, congratulations on helping him fail...
No kidding
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The guy says that he'll give any help to anyone who wants it.
Well, what about that guy who wants to write an app that locks Windows with a password until the customer pays??
Sure, you help him out, he get the app working, then his code fails to unlock a machine after the customer pays. He then gets sued for damages, and now anyone who helped him write this code is now complicit in a, say, "scheme to defraud". Why is it so difficult to understand that you have to think before you post?!
|
|
|
|
|
Dave Kreskowiak wrote: Why is it so difficult to understand that you have to think before you post?!
That is a biggie that seems to plague some people. Especially the ones that can't seem to read the forum posting guidelines at the top of the page (which actually dawns on me that there really isn't one at the top other than the message Chris puts in the top post of the forum)
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: That is a biggie that seems to plague some people.
Sadly, it's as curable as Ebola.
Paul Conrad wrote: Especially the ones that can't seem to read the forum posting guidelines at the top of the page (which actually dawns on me that there really isn't one at the top other than the message Chris puts in the top post of the forum)
Even then, it doesn't show up all the time. It should really be part of the page itself.
|
|
|
|
|
Actually, probably the guy will pass the class, possibly with distinctions, went on to become IT/PM manager.....
Cest la vie...
|
|
|
|
|
1. Do your own homework.
2. If you get stuck in some specific code, then post and we will help.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: 1. Do your own homework.
Well, but pmarfleet already did it for him
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Guys do not worry about my assignment. Do not assume things that you do not know. I am just trying to get my hands on VB .NET by reading a book. Just curious to solve few things that are seen as an exercise.
|
|
|
|
|
hello,
I am trying to add a new row to a dataset. I then write this changes to a xml file for local storage. However, I have noticed that when I read the xml file back into a dataset and display in the datagrid, the incidentID (PK) is NULL. The incidentID is auto incremented in the sql server database.
Am I doing something wrong?
<br />
Dim dr As DataRow<br />
dr = dsIncidents.Tables(0).NewRow()<br />
dr("Company") = Me.cboCustomer.Text<br />
dr("Contact") = Me.cboContact.Text<br />
dr("PhoneNo") = Me.txtPhone.Text<br />
dr("Priority") = Me.cboPrority.Text<br />
dr("Subject") = Me.txtSubject.Text<br />
dr("AssignedTo") = Me.cboUsers.Text<br />
dsIncidents.Tables(0).Rows.Add(dr)<br />
<br />
dsIncidents.AcceptChanges()<br />
<br />
dsIncidents.WriteXmlSchema(incidentXSD)<br />
dsIncidents.WriteXml(incidentXML, XmlWriteMode.DiffGram)<br />
<br />
Me.grdIncidents.Datasource = dsIncidents.Tables(0).DefaultView<br />
-- modified at 23:22 Thursday 13th September, 2007
|
|
|
|