Showing posts with label experiencing. Show all posts
Showing posts with label experiencing. Show all posts

Friday, February 24, 2012

Developer Environment vs. Live Server

I am experiencing a situation where certain functions work perfectly when I run it on my local machine under MVS, but when I upload it to the server, then it does not?!

Here is an example:

I am using a drop down box (in a FormView) that is databound in an online submission form. When I run the application in MVS, then I can edit the records by opening the form, and selection the new value in the drop down list. The new value is then also saved to the database when I hit the update button. When I upload the code to the server, then the drop down list shows the correct information (so the databinding to the control seem to work correctly), but the new value is not saved to the database.

Here is the code for the drop down list:

"DropDownList1" runat="server" DataSourceID="SqlDataSource3"
DataTextField="UserName" DataValueField="UserId" SelectedValue='<%# Bind("UserId") %>'
CssClass="text">
"SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:LocalSqlServer %>"
SelectCommand="SELECT [UserName], [UserId] FROM [vw_aspnet_Users] ORDER BY [UserName]">


Here is the code updating the database with the record (I have removed some records as well as the Insert and Delete parts):

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:tourism_connect1 %>"
UpdateCommand="UPDATE Resorts SET typeid = @.typeid, destrictid = @.destrictid, UserId = @.UserId, WHERE (resortid = @.resortid)"
OnInserted="SqlDataSource1_Inserted">

<UpdateParameters>
<asp:Parameter Name="typeid" />
<asp:Parameter Name="destrictid" />
<asp:Parameter Name="UserId" />
<asp:Parameter Name="resortid" />
</UpdateParameters>
</asp:SqlDataSource>

What I can mention further, is that if I connect to the database that is on the live server (so the application runs in MVS on my local machine, but it then retrieves the info from the online database), then it also works fine. It is just giving this issue when the online application is trying to update the values.

There is also no errors during the process.

I will appreciate any advise on how to overcome this, as I really do not know where to look anymore...

Thanks in advance!

Regards

Jan

Have you checked logs? My first guess is a permission error, but it's a guess at this point with the given information.

Jeff

|||

Hi Jeff,

I had a look at all possible permission settings, and I just could not find anything! Unfortunately my service provider can not give me access to the logs at this time, so since everything else failed, I decided to redo the whole lot. The good news is that I got it working, and the problem seem to have been due to date formatting.

I have a Text Box that I update in the Page_Load event with the current date when the record is edited. The code looked like this:

TextBox varLastRevised2 = ((TextBox)(FormView1.FindControl("LastRevisedTextBox")));
varLastRevised2.Text = DateTime.Now.ToLongDateString();

For some reason, when this value needed to be placed back into the database, then the format of the date was not recognised. So I have changed the code to the following:

TextBox varLastRevised2 = ((TextBox)(FormView1.FindControl("LastRevisedTextBox")));
varLastRevised2.Text = DateTime.Now.ToString();

With this, it seem to be working.

The strange part is that I would think that there would be some sort of error if the date format was giving an error, but instead it just did not do anything. I am sure that the logs might have contained some info about this, but this is something I'll have to clear up.

Thanks for your advise in any case.

Best Regards
Jan

|||

This is maybe beacuse the database objects (e.g. tables, stored procedures,..etc) is created on the MVS with a user (say UserA), and now in the live server you are using another user (say UserB) who has the right permission to SELECT data (for example), but he can not see the table. Why? because it might be located in a schema that "UserB" can not access to it.

Make sure that the database user in the live server can see tables in the schema where you put the tables you got from development.

Good luck.

Friday, February 17, 2012

Develop Database on Local machine? MSDE

Hi all
I am experiencing a problem comming to grip[s with MSDE and what it does.
I need to develop an SQL Server Database but i only have a Windos XP OS
and not a server type system.
From what i understand i should be able to use msde as the engine and
utilsie the tools that i can install with SQL SERVER eg enterprise manager.
To my way odf thinking that would enable me to develop a database with
out the need for a server OS.
If this is correct i am having trouble installing MSDE 2000 and using it
with enterprise manager. can some please put me on the right path.
I have used the MSDE with SQL Server but the service seems to stop and i
cant get it restarted, so i am beliveing i just dont have it setup
properly.
Please any docs or sites and advice sent my way will be greatly appreciated.
What is the best environment to develop with one PC?
Thanks in advance
Greg
hi Greg,
"oldgradgreg" <oldgradgreg@.netscape.net> ha scritto nel messaggio
news:OQClCBnVEHA.2408@.tk2msftngp13.phx.gbl...
> Hi all
> I am experiencing a problem comming to grip[s with MSDE and what it does.
> I need to develop an SQL Server Database but i only have a Windos XP OS
> and not a server type system.
> From what i understand i should be able to use msde as the engine and
> utilsie the tools that i can install with SQL SERVER eg enterprise
manager.
> To my way odf thinking that would enable me to develop a database with
> out the need for a server OS.
> If this is correct i am having trouble installing MSDE 2000 and using it
> with enterprise manager. can some please put me on the right path.
> I have used the MSDE with SQL Server but the service seems to stop and i
> cant get it restarted, so i am beliveing i just dont have it setup
> properly.
> Please any docs or sites and advice sent my way will be greatly
appreciated.
> What is the best environment to develop with one PC?
WinXP is fine, and you cna install on it bot MSDE and/or SQL Server Desktop
Edition or SQL Server Developer edition, now priced at $49.00 =;-D.
the latest solution, the Dev edition, shoul'd be the best one to go, both
for pricing and for tools... you have all the tools you (usually) need to
develop, test and tune your application(s), and then you cna bundle MSDE
with tem, as MSDE was really not intended for develping phase, even if it
can...
as regard your MSDE instance, it's not clear to me your inconvenient... does
it starts and then stops? or does it not start at all?
please check, in the services control panel applet, the account running SQL
Server and SQL Server Agent services...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Hi andrea
Thanks for your advice, the MSDE instance does start, but for a reason i
cannot find it stops and i cant seem to get it to restart, My only way
to get going again was to uninstall msde and reinstall. I have my
database saved
I have tried the 2000a version of MSDE but get very confused as a
service manager does not appear. so i have no idea on how to get things
going. The doco is more towards deploying than stting up on a local machine.
Can i ask if the developer version is in the Visual studio .net package?
as i might get this (still a student).
Or maybe your view on an ideal developer environment for SQL Server
(Oracle is so much easier) i intend doing the front end with VB
your help is greatly appreciated
regards
greg
Andrea Montanari wrote:
> hi Greg,
> "oldgradgreg" <oldgradgreg@.netscape.net> ha scritto nel messaggio
> news:OQClCBnVEHA.2408@.tk2msftngp13.phx.gbl...
>
> manager.
>
> appreciated.
>
> WinXP is fine, and you cna install on it bot MSDE and/or SQL Server Desktop
> Edition or SQL Server Developer edition, now priced at $49.00 =;-D.
> the latest solution, the Dev edition, shoul'd be the best one to go, both
> for pricing and for tools... you have all the tools you (usually) need to
> develop, test and tune your application(s), and then you cna bundle MSDE
> with tem, as MSDE was really not intended for develping phase, even if it
> can...
> as regard your MSDE instance, it's not clear to me your inconvenient... does
> it starts and then stops? or does it not start at all?
> please check, in the services control panel applet, the account running SQL
> Server and SQL Server Agent services...
|||hi Greg,
"oldgradgreg" <oldgradgreg@.netscape.net> ha scritto nel messaggio
news:%23OdPlByVEHA.1164@.tk2msftngp13.phx.gbl...
> I have tried the 2000a version of MSDE but get very confused as a
> service manager does not appear. so i have no idea on how to get things
> going. The doco is more towards deploying than stting up on a local
machine.
if you set up MSDE without enabling network protocols, the installed
instance can not be shown in service manager combobox as reported in
http://support.microsoft.com/default...b;EN-US;814132

> Can i ask if the developer version is in the Visual studio .net package?
> as i might get this (still a student).
the Dev edition of SQL Server comes only in VS.Net enterprise package... the
other VS.Net editions only provides MSDE...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Andrea Montanari wrote:
> hi Greg,
> "oldgradgreg" <oldgradgreg@.netscape.net> ha scritto nel messaggio
> news:%23OdPlByVEHA.1164@.tk2msftngp13.phx.gbl...
>
> machine.
> if you set up MSDE without enabling network protocols, the installed
> instance can not be shown in service manager combobox as reported in
> http://support.microsoft.com/default...b;EN-US;814132
>
>
> the Dev edition of SQL Server comes only in VS.Net enterprise package... the
> other VS.Net editions only provides MSDE...
Hi andrea
Thanks for your reply, after a long night last night i worked it all
out, i had to actually go to the services window and physically start
service manager, somehow it was set to manual.
Now i have another issue, when i create a database i get a suspect next
to the DB and and an error 5105 "database already exists".
i have searched long and hard on this issue and it seems to be one of
those things that a number of problems could be causing it. do you have
any sugestions.
regards
Greg
|||hi Greg,
"oldgradgreg" <oldgradgreg@.netscape.net> ha scritto nel messaggio
news:eszInS$VEHA.3368@.TK2MSFTNGP10.phx.gbl...
> Now i have another issue, when i create a database i get a suspect next
> to the DB and and an error 5105 "database already exists".
> i have searched long and hard on this issue and it seems to be one of
> those things that a number of problems could be causing it. do you have
> any sugestions.
please have a look at Hugo answer in http://tinyurl.com/3ecnj ... it might
help
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply