ADO.NET :: How To Retrieve Data Fron Mssql
Jan 25, 2011i want to know how to retrieve data from database to label and store text box data into data base
View 3 Repliesi want to know how to retrieve data from database to label and store text box data into data base
View 3 RepliesI'm an experienced PHP programmer that is new to ASP.net (C#). I'm trying to figure out how to do a manual echo of a specific field from an SQL database and was wondering how you do an if condition in case the field would meet certain criteria ?
What I want the script to do is check in the database if a certain condition is activated, then the html page should echo a windows media player object with the source of the video coming from the database itself ( $line[Video], and if the condition isn't active then either don't echo the player or just echo an old video (in the script I'm just printing a message).
in PHP:
[Code]....
I am about to get my sites hosted with a local host company. They are offering me their lowest cost MSSQL server, which is the web edition. So my question is what is the difference between that and 2008 express edition? Can express edition be used for a full fledge in production website? And does Web implies that I will be interacting with it via the web correct. Lastly, if the web version is not chosen what is the typical protocol for uploading and maintaining a site when you have a dedicated server. Do you normally have to go to the data center or is there like a web portal that can be used. I will be asking the guys at the company these questions as well, but I want to make sure I get another opinion on the issue.
View 1 RepliesI was wondering what you guys thinks is the most efficient way to select data from a msSQL database.. I tend to use a sqldatareader, but is this really the best way? - It is particularly impractical if one also must take into account, that the table may be "Null"?:
[Code]....
[Code]....
On the internet we bought/hired a CRM product. When we enter a new project this datarecord (on their MSSQL DB) is transferd to our local MSSQL DB.
Internally we got a seperate application that uses the project information.
So after an insert project on the CRM side (on the internet) the data is transferred to our DB. When i check the internal application I see the project. All nice and sweet.
BUT when I alter (UPDATE) a project in the CRM internet application this data is pushed to our DB and i see the data in the table. But it doesnt show up in the internal webapplication. When i restart the website in IIS it still doesnt. Only when i restart the entire IIS the data is updated in my internal application.
Used techniques:
.NET 3.5MSSQL 2005LINQ to SQL The only thing i can imagine is that LINQ to SQL has a own cache or something. If so... how to disable it
I am getting ready to just write my own, but I have a need for some regular expressions that will validate strings to make sure they are in an acceptable format to be inserted/updated into a database field. I figure it may just be to find a list of them someone has already posted somewhere and just use those.
View 3 RepliesI have encountered the task of saving an image to a MsSQL Server Database. (Although I haven't even managed to do it yet).
But anyways I need to link this image from the MsSQL Database to Gridview. Can this be done ?
I have a database which stores .png images as the sql "image" type. I have some code which retrieves these images as a byte[], and sends them to the page via the FileContentResult object in .Net. Performance is key in this application, and the images have to be retrieved and displayed as quickly as possible. My question is, can this operation be performed quicker by passing a byte stream from the database to the browser, and not at anytime storing the whole byte array in memory. If this is possible and worthwhile doing, how do I do it?
Here is the code I have so far:
[code]....
I would like to know how i can take a backup of my database to .bak file on my pc using asp.net code?
View 8 RepliesIs it possible to create a wap having a mssql connection?
View 1 RepliesI asked plesk the following question:I've been through the documentation and scoured various forums, but I can't find a defintive guide to uploading an mssql db (contained in a app_data folder) to the server and conecting it via the Plesk control panel. I've created a db and user via the panel but how do I get the actual db to the server and get it to work?"and they replied:"For database restoration please upload your database backup file ( i.e. .bak ) under your hosting space and update us the exact path where you place this file + your database login details ( i.e. database name , database user name and password ). So we restore this database for you. "
View 3 RepliesI often hear the term database driven web app and just wanted to make sure using that description is the most accurate when describing an asp.net web app that relies on an SQL Database for all of its dynamic information.
What specifically is the correct terminology.
I have created a C# registration page that includes a secret question and answer. The secret questions are in a dropdown list. When the form is submitted, all field information gets written to my mssql database successfully but the value selected in the dropdown ListItem gets NULL inserted instead of the question.
What am I missing? Here is my code.
[Code]....
This may not the best place for this question, but I'm going to give it a shot. I have a large (3GB) file that contains maybe 100 fields, CSV. ALL FIELDS are surrounded by double quotes, a standard CSV file. So, it looks like this:
"12345678", "SMITH", "JOHN", "GARLAND, TEXAS", "75043","","","","37" (and so on)
I need to import this into SQL server but have been unable to find any simple way of doing so using the BULK INSERT. I could obviously do it with some coding [a lot, given the number of fields] but one would think a product like MSSQL would have this most basic of functionality built in.
i want to make so i can check if the string already exists in a row in my table in the mssql from my application with c#.
View 4 RepliesHows does one move viewstate to the MSSQL 2005 server? Asp.net 2.0 Ajax project.
Can it be only done for a single aspx page or a group of pages, of does it have to be the whole application?
How do I import this XML: [URL] into MSSQL?
View 5 Repliesmy question is that i actually want to make a table in a database and update delete the recordsin that table The thing is that i dont want to make the database table in the sql server but i want to make it in the visual web developer (the editor i am using) can any body gimme any idea abt how i can do this orany link regarding to this
View 11 Repliesi have to insert values in two tables on save button click.ne sipmle insert and return a order_id.that id is used for inserting order details information.i am using a datatable to store this information,then insert to table.i want use Transaction for both insert on save button click.
View 1 RepliesFirst, I use vs 2010 and asp.net 4.0.
I have a page, there is a pre-created checkboxlist, for certain people it should be possible to add new checkboxes to the list.How should they do that? Here is what I have in mind.
Next to the checkboxlist there is a button (Add new items), when clicked a popup should be shown, there the name for a column (in a pre-created table MSSQL) can be entered (this column is only a text column), column is created and when clicked ok, the checkbox is added to the list (checkbox binded to the just created column).
have sql server, with databaste that i created with one test table.i need to disply the database i try with Gridview but it's dosn't worked, how can i display my database?b.wi know ADO c# , i know how to work with databases on winform. but i never try to do this with asp page,if enyone can send me some good guide to create the connection, and use, insert,update ect..
View 4 Replies I am new to asp programming and have inherited an old website that was connected to an SQL 2000 server. The SQL 2000 server is being retired and replaced with a SQL 2008 server. We moved the DB to the new 2008 server with no problems. However the web site does not function (Database Connection error). I believe the problem is with the old asp code being written for mySQL vice SQL. It may have worked on SQL 2000 but it does not seem to work on SQL 2008.. The code is below:
<%
function write_it(mystr)
if not isnull(mystr) then
[code]...
We need to send out about 10.000 letters each month. They will be sent via postal services so I have to print them out with a new label/address on each letter. The envelope does have a window so the letter will be printed with the address.
All addresses will be found in a MSSQL database. I know how to make a SQL connection. I really need some input on how I would start doing this. The letter will be a twosided letter with the address in the upper right corner. How can I make a connection so that it loops trough the database for address and adds one by one. It should also add a new letter/page for each address found in the database.
How can I select a random row and then update or delete it? I've found how to get a random row, using SELECT TOP 1 column FROM table ORDER BY NEWID() do I have to make another select using this result in order to update the row, or it can be done more efficiently?
View 10 RepliesMy employer is changing hosting providers.Our current hosting provider offers MSSQL which we use for the database used on our website. The host we are changing to is insisting that we switch to MySQL because they only offer an older version of MSSQL and are concerned about compatibility issues.I have absolutely no experience working with MySQL and am a novice with MSSQL as well. What is the best way for me to port a database from one to the other?I have downloaded MySQL and Workbench... I've also downloaded the .Net connector as a zip file but am not sure where to extract its contents.
View 3 Replies