|
actually server is located remotely (mean on the internet).
i already use connectionstring provided by you.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
From the Connection string i gave you. Apply the IP Address of the Server, it will work, as Sitting here am accessing the SQL Database and i used VB.net to my Application to a SQl Server not in my building, its Far in another City. try it and tell me the Errors that you encounter
Dont bother where ever the server may reside in your connection string you just change datasource(server) field
datasource=IP of the server if you are using internet
or
datasource=server name iof you are using local server
connection never changes but make sure that user id and password are correct
Vuyiswa
|
|
|
|
|
hi Vuyiswa,
i already try datasource as u specify. it work well for local server but not for remote server.
i get following 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)
i don't know where i m wrong ?
is this related to proxy ?
thanks
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Rupesh
Your code is Correct there are two or more reason why you Got that Error
Its Eather you Dont have the Correct Credentials to Log in meaning username and password, or you have no permission to the database or table you want to Access. or You hae supplied the Wrong server, or your Server is Down. please send me the code that you wrote and let me see your connection string.
Vuyiswa
|
|
|
|
|
Vuyiswa,
this is the code
Dim SqlConn As String
Dim con As SqlConnection
SqlConn = " Data source=64.78.15.54; Initial catalog =counterbar1; uid=havenbar; pwd=bar91384;"
con = New SqlConnection(SqlConn)
con.Open()
If con.State = ConnectionState.Open Then
MsgBox("connected")
End If
try this code and tell where i m wrong
Thanks
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
The Code is Correct, make sure you are using the correct IP for the SQL Server,you might find out that, you have been provided with the wrong IP for SQL Server, Make sure the username:havenbar have right to Access the Database you want to counterbar1. But all the rest is Correct.
Vuyiswa
|
|
|
|
|
Vuyiswa,
i m sure IP address is correct. But i will again confirm it with client
Thanks for ur support.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Welcome,let me ask you. is the SQL server at your client a Dedicated or non Dedicated? , if its non Dedicated he might have gave you the wrong IP,
Vuyiswa
|
|
|
|
|
hi Vuyiswa
first of all,sorry for delay.
i m not sure about this point,but i will confirm.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Its Ok Take your time, am here Day and night learning and teaching
Vuyiswa
|
|
|
|
|
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
oSQLConn.ConnectionString = _
"Network Library=DBMSSOCN;" & _
"Data Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oSQLConn.Open()
add the port number of the SQL server
Vuyiswa
|
|
|
|
|
hi Vuyiswa,
i have already tried for this port number. But no suceess.
Presently confirmation about IP address is still pending
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Have you ever resolved this? If not then I have to ask.....can you telnet to the SQL server from the internet? Also is the router forwarding all packets on 1433 to the SQL server or is this server on the internet with no router at all?
Tom Wright
tawright915@gmail.com
|
|
|
|
|
hi tom,
i resolved this problem . there r small problem at client side.There r no problem in my connection string. Now my connection string work well
thanks for your support
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
how can display a table (in .mdb file) by datagrid
|
|
|
|
|
create a Dataset and populate it with your table data....now assign the Dataset as the DataSource of the Datagrid in which you want to display data...
Tirtha
Miles to go before I sleep
|
|
|
|
|
my purpose is to copy selected records in a list control into a table in .mdb file;
but st is wrong
void CReadDBDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CDaoDatabase db;
CDaoTableDef tableDef(&db);
db.Open("C:\\ktt.mdb");
db.Open("C:\\ktt.mdb");
CString strSQL;
CString str0;
CListCtrl* pListCtrl = (CListCtrl*) GetDlgItem(IDC_ListControl);
ASSERT(pListCtrl != NULL);
POSITION pos = pListCtrl->GetFirstSelectedItemPosition();
if (pos == NULL)
TRACE0("No items were selected!\n");
else
{
while (pos)
{
int nItem = pListCtrl->GetNextSelectedItem(pos);
TRACE1("Item %d was selected!\n", nItem);
// you could do your own processing on nItem here
str0 = pListCtrl->GetItemText(nItem,0);
strSQL.Format("INSERT INTO Table6 IN 'D:\\copyktt.mdb' SELECT * FROM Table3 WHERE MyField = %s ",str0);
db.Execute(strSQL);
}
}
}
|
|
|
|
|
So there's this guy I know and he wants me to teach him data modeling in a nutshell. He asked me to just give him a fast run-down on Primary Keys, Foreign Keys (the difference) and normalization. He's pretty smart so a link to something brief but technical is fine.
...
...
Okay! I'm lying! The guy is me and I haven't done data modeling in years. I'm trying to remember this simple thing. If I have a table called Sequences as an example and I have a table called OrderProcessing and 6 other tables that use Sequences.SequenceId (or a number representing that number in the Sequences table). Do I just make all of them FK's to the Sequences.SequenceId PK?
Does that make sense? I totally need a drug test and I know that...
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.)
I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
Ancient of days! august Athena! where, Where are thy men of might? - Lord Byron
|
|
|
|
|
|
First, let me start off by saying, "The Codd, the whole Codd, and nothing but the Codd. So help me Codd."
Second, let me tell you to normalize to at least the 3rd form normal.[^]
Oh yeah, a word of warning, oh mighty data diddler, once you master normalizing mere mortals will require you to denormalize in order communicate with them...
EDIT: Duh! I guess answering your question would help. The answer is "yes".
"We are all repositories for genetically-encoded information that we're all spreading back and forth amongst each other, all the time. We're just lousy with information."
- Neal Stephenson
|
|
|
|
|
Jerry Hammond wrote: Oh yeah, a word of warning, oh mighty data diddler, once you master normalizing mere mortals will require you to denormalize in order communicate with them...
Unless it is for performance reasons, VIEWs can help with this.
|
|
|
|
|
I have an application that is creating its own databases at run time. This application has a dedicated file structure for storing the database mdf and ldf files under its application directory under "Program Files". The issue I am having is this (sorry for lengthy explanation):
Originally I created a temp folder on my c drive such that I had c:\temp\ for storing these files. I could deploy my application with no problem what so ever.
I have recently moved the temp folder into my application's root directory such as this: c:\Program Files\MyApp\Working\Data\.
Should be no problem as the folder has an exact same setup as the c:\temp folder. But, the database will not allow databases to be created in the folder or any directory under "Program Files".
I have found that if I go into permissions and give the folder under "ProgramFiles" the sqluser$machinename$serverinstance group permissions it will work fine.
So my question is WHY? and HOw can I skirt this issue at deployment?
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
hello,
my problem has got to do with XML and SQL, so i didn't know where to post my problem.
But now to topic: SQL Server 2005 has many different column-types e.g.: int,varchar... and also XML. I chose XML for one column in order to save a xml-document (not file) in it. But i always receive an error, that XML cannot be parsed into string. So i tried a little bit and made it working with ' xdoc.InnerXml '.
But how can i parse that string back to an xml document?
I hope i understandable explained my problem.
Thank you
chrstn
PS: Sorry for my bad English
|
|
|
|
|
I am using DTS to import data from an Excel Spreadsheet. One column, which is typed as VARCHAR(100), will import numbers but when the data in that column is formated like:
HMPG:051022:RSK:IDIGO2SPI9S-WWD_JJTXWE1G7UOTXCFZLQ:04252007:102844PM
OR
013970:MKENDE6548:MARTHA
I am getting a NULL imported in it's place.
Any ideas?
Thanks,
Bryan
|
|
|
|