Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Friday, March 30, 2012

Modifing Data in SQL

Hello, and sorry for the vauge title.

Basically, I am building a web application where people can enter in raffles. So I set up a SQL DataBase, where I have a table for each raffel going on. In each, I have a UserName collum, and a ID collum, the ID being the key collum. On my page, I basically have a TextBox and a Button.


I know I add a SqlDataSorce to the page, and use a INSERT command, however I am not sure how to parse this in a way to make it so that when you type your UserName into the TextBox, and then click the submit button, it will create a row using the UserName.

Thanks for the help!

I'm assuming that your key column is an identity column, so we don't have to create a new key.

You have a seperate table for each raffle, and each one has its own username column? I suspect that you're better off with one table for all raffles, and a key field for the raffle that a row is for. That way you don't have to create a new table every time someone does a raffle.

Let's assume that the function GetTable() returns the name of the table for the raffle the user's signing up for.

source.InsertCommand = "Insert into " + GetTable() + "(UserName) Values(@.UserName)"

Then bind the data source to your textbox.

|||

Thanks, but I don't get the last part, "Then bind the data source to your textbox." Because if you do that, then it won't interact with the database.

And if you ment it the other way around, (Bind the textbox to the data source), I can't. You can't bind textboxes to datasources.

Help?

|||

I don't do much with SqlDataSources. If it were a straight SqlCommand, then inthe click event of your button, I'd have

cmd.Parameters["@.UserName"].value = txtUserName.Text;

cmd.ExecuteNonQuery();

|||

Sorry if this is really obvious, and I'm just stupid, but I can't figure out what to use for "cmd". I think you are refering to the SqlCommand, (Insert), but that doesn't work. (I've also tried InsertCommand).

Sorry that I can't get this.Stick out tongue

Monday, March 26, 2012

Mobile replication

I have the following setup

Server 1: Windows 2003 inc IIS. Also on this server is SQL Server Web sync web service and it has an external IP address for internet connectivity

Server 2: Windows 2003 inc SQL Server 2005. This server has a database setup with replication so the a Window Mobile 5 device can do a merge replication.

My problem is that the replication fails when trying to send the snap shot from Server 2 to the mobile device. The device seems to get through to the replication agent, as entries in the Replication monitor are logged (see below).

I have checked all the permissions on the relevant shares required for replication (basically set "Everyone" with full access).

My initial question would be.... When the snapshot is been sent to the mobile device, does the SQL Server try to send it directly to the internet or does it go through "SQL Server Mobile Server Agent 3.0".

Please can someone help, as this is causing me some REAL problems.

Error messages:
The schema script '\\ukrt1-sql902\SQLRepl\unc\UKRT1-SQL902_EXEL_DAMAGECODESEXEL\20060810142533\DamageAction_2.sch'
could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147023570)
Get help: http://help/MSSQL_REPL-2147023570

The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization,
the merge process may have been unable to create or write to the message file. When troubleshooting,
restart the synchronization with verbose history logging and specify an output file to which to write.
(Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001

I fixed this issue....

The snapshot directory on the datbase server didnt have the correct permissions. This is because the SQL Agent on the IIS server was setup with the default user... The IIS default...

Saturday, February 25, 2012

Missing Microsoft.ReportViewer.ProcessingObjectModel.dll

How can I get this dll so that I can copy it over to the hosting server?

I am using a third party to host a web application I can not run ReportViewer.exe to get the correct dlls installed.

I have tried to use CMD to copy the file Microsoft.ReportViewer.ProcessingObjectModel to the bin directory. This file does not have the .dll extension and it will not copy.

What else can I do?

Thanks,

enak

follow the following link:

http://drowningintechnicaldebt.com/blogs/dennisbottjer/archive/2006/10/16/Hacking-Report-Viewer-Redistributable.aspx

Your problem will be solved.

Missing images in reportviewer report

Has anyone experienced intermittent missing images in a report served up with the reportviewer from a web form? Basically I've got a report that has several embedded jpg images and when I bring it up in IE 6 over half the time it will show the infamous red x stating the image was not downloaded. If I refresh the page a few times the images will eventually show but they will disappear again after another refresh or two. Interestingly enough I don't experience this behavior at all when using Firefox. I originally thought the HTTP compression I have set up for IIS 6 might be interfering, but I still have the same problem when I turn it off. I tried using Fiddler to see what was failing but for some reason it works every time when I have Fiddler running. Any help/advice would be greatly appreciated.same thing here using ie7. did you ever resolve it?|||

I too have this issue. It happens in two places for me, an external image (logo) that is uploaded through the Report Manager, and also the charts are not showing.
These problems reside when using the reportviewer.
When I view the reports through the default report manager, it all looks fine.

|||I was also not getting the print dialog box after pressing on the printer icon in report server. Moved the app to another server and the images and the dialog box started working. I believe it was some security setting that was preventing it, never found out what was causing it.|||

vatech1993:

Has anyone experienced intermittent missing images in a report served up with the reportviewer from a web form? Basically I've got a report that has several embedded jpg images and when I bring it up in IE 6 over half the time it will show the infamous red x stating the image was not downloaded. If I refresh the page a few times the images will eventually show but they will disappear again after another refresh or two. Interestingly enough I don't experience this behavior at all when using Firefox. I originally thought the HTTP compression I have set up for IIS 6 might be interfering, but I still have the same problem when I turn it off. I tried using Fiddler to see what was failing but for some reason it works every time when I have Fiddler running. Any help/advice would be greatly appreciated.

Any solution?

|||

As far as e

|||

As far as e