|
My first idea: I see you have connection strings hardcoded into your source code. Are you changing them before uploading to match configuration from the hosting server? If not, it can't work, because (most likely) your service cannot find server DANDAN-PC, nor file "C:\\MemberSites\\MemberSites_AspSpider_Info\\akosiDAN\\database\\Database1.mdb".
You should move both those connection strings to the web.config file.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Hello,
Thanks for the reply,I tried changing my connection strings now provided in my web hosting site. The connection strings given by my host is in this link
http://www.aspspider.com/tips/Tip18.aspx[^]
I'm not that so much sure but doesn't the ms access database supposed to work since I followed it. I tried commenting the one using sql server connection string just to test the ms access 2003 and I even tried to re add my web reference to be sure but still I got an error.
To give clarification my error is in below
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: 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.
I'm also confuse since why does my error state that I have error in sql but I'm using oledb since my database is ms access 2003 and I already comment the block of code using sql.
Any help are kindly appreciated.
Thanks,
DAN
|
|
|
|
|
Indeed. Both connection strings are absolute paths to things that are on the local machine, and almost certainly won't be in the same place when hosted. Make sure the connection strings in the uploaded version point to where the database actually is (your host should be able to tell you this).
And indeed, connection strings should be in a configuration file, so your code base can be the same for testing and deployment.
|
|
|
|
|
Hello,
I fix now the problem it seems that one causing the error is the bin file of my webservice. I notice that although I edit the code of my asmx file and even if its a working code but if I did not re upload the the bin file of my webservice.The website still load the past code of my asmx rather than the new one.
Thanks everyone,
DAN
|
|
|
|
|
This code shouldn't even compile. You've got the exact same method (getData) defined twice, with no difference between the two method headers. There has to be some way to deifferentiate the two either by name or by the parameter list.
|
|
|
|
|
Hello,
Sorry for the confusing part. I was trying to test only if how it work by commenting other or vice versa in that time thats why I have the two methods. Thanks for the reply.
Any help are kindly appreciated.
Thanks,
DAN
|
|
|
|
|
Hello,
I fix now the problem it seems that one causing the error is the bin file of my webservice. I notice that although I edit the code of my asmx file and even if its a working but if I did not re upload the the bin file of my webservice.The website still load the past code of my asmx rather than the new one.
Thanks everyone,
DAN
|
|
|
|
|
Have a look on the connection string of the MDB file. or use Server.Mappath to get actual path of the mdb file.
|
|
|
|
|
Hello,
I fix now the problem it seems that one causing the error is the bin file of my webservice. I notice that although I edit the code of my asmx file and even if its a working but if I did not re upload the the bin file of my webservice.The website still load the past code of my asmx rather than the new one. Thanks also for the server.mappath if was a great help to map the path of my files.
Thanks everyone,
DAN
|
|
|
|
|
Hi,
On my local machine, I have developed a c# application which reads from a sql server express database.
Now I want to install these (The application and the sql server express) on the client machine.
On the client machine, with the login I have, I can only have access to the U drive.
Questions:
1- Can I install the appplication on the U drive or does it have to be the C drive?
2- I also have to install the sql server express on the client machine. Can It be installed in the U drive?
3- The application has a config file which is used to access the sql server i.e. ./sqlexpress, etc...
What should the config file path be if both the application and the sql server express are installed in the U drive?
Thank you
|
|
|
|
|
You can install the application where ever you would like, however, there may be components, especially with SQL Express that will require administrator rights.
The connection string for SQL Express would be .\SQLExpress, where the dot is shorthand for local.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes, the installation of sql server requires the admin rights but does it have to be installed locally into c drive or can I point it to u drive?
Thanks
|
|
|
|
|
Once again, you can install the application anywhere. That includes SQL Express, it will default to the c: but you can change that.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Once I install the sql server express on the U drive, then will I be able to access the management studio window from any machine which does not have sql server express installed in it's c drive?
Thanks
|
|
|
|
|
|
No.
Every PC that is going to manage that database with the management studio has to have the studio installed. You cannot just install the studio once and run it from anywhere. There are more than a few components that have to be registered on each PC that's going to run the management studio.
Once the studio is installed, you can manage the database on the U: drive.
|
|
|
|
|
If you have the administrator right you can instal at any drive.
|
|
|
|
|
|
how can i creat a report button for databse i have in c#
|
|
|
|
|
I think a little more information is needed. What do you mean by report button? a button that you click and see a ssrs report? or a report built from gridviews? or crystal?
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
Add a button to your form.
Caption it 'Report for Database'.
Add an event handler that creates a report.
(Seriously, you need to at least make the effort to determine what your problem is. No-one is going to write a reporting system for you.)
|
|
|
|
|
|
Hi,
I have field in database and it is defined as Varchar(max).
And in the front in ADO.NET I am trying with the options
AddParamToSQLCmd(sqlCmd, "@Comments", SqlDbType.VarChar, -1,
ParameterDirection.Input, pArg.Comments);
SqlDbType.NVarChar, -1
SqlDbType.VarChar, -1
SqlDbType.NText, -1
and nothing seemed working. I am trying to insert over some 48000
charecters but it is storing only 43500 some charecters. Not sure if I
am missing some thing. Am I doing it right or can some one please help
me how to get around this issue.
Thanks in advance
L
|
|
|
|
|
|
I tried with the Text but the same thing it can't store more than 43567 charecters. I also tried updating the Text database field that I just created for testing in the management studio but no luck. For some unknown reason it is storing only 43567 charecteros of text.
Any inputs towards fixing this issue is greatly appreciated.
Thanks,
L
|
|
|
|