|
i started studying myself C++ and VC++ 4 months ago.i have done some simple applications.And my new task is show a table (in mdb)file in a list control in my application. And can copy selected row in the list control in another table in another location.Drafly like that.I have tried for 32or 3 weeks aready, but haven't finished yet and found a lot of problem.Am i too stupid?hehe
|
|
|
|
|
No! Keep trying, thats the way all learn!
Gautham
|
|
|
|
|
thank you so much,
|
|
|
|
|
how to store and retrive an video file in database
ramakrishana
|
|
|
|
|
Create a BLOB in the database and store it in there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
how to delete duplicate rows in a table if that tables has no primary key
|
|
|
|
|
The quickest method is to add a primary key to that table. You can always remove it after you've deduped the table.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi,
i m newbie for Sql server.presently i m developing application in vb.net
can anybody tell me what is the exact connection string to connect sql server which is located remotely .
Related information is following:
Server Side:
SQL server 2000
IP address- xx.xx.xx.xx
Database Name-MyDatabase
UserName-Myuser
Password-MyPassword
Client Side
XP SP2
VB.NET
SQL Express Edition 2005
SQL Native Client
Thanks
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I dont know this if will help you but try this this is the Common one
"Data Source=ipaddress;Initial Catalog=db;User Id=username;Password=apassword;"
Is the server on the same Lan as you are?
tell me if it helped
Vuyiswa
|
|
|
|
|
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
|
|
|
|