i am trying to insert utf-8 data into ms-sql server using asp. i created an input box from where other charater (like chinese,japnese) will be inputed and should store it in sql server.and it is inserting it as some junk characters in sql server. but When i tried to display it in browser it is not displaying properly. in asp page i wrote this
session.codepage = 65001
response.charset = "utf-8"
' INserting goes here
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ??
Ex : I have 2 arrays : arr1 = Array(1,"allo") arr2 = Array(2,"bonjour")
Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily? If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
I'm currently tring to insert data into an access db using asp. I have a form which is found in a popup window and which contains the fields Name and Comment. When I click on the Submit button,I call a javascript function in order to redirect the user to the page that will save the name and comment.
However,I am having an error like this:Field 'VoicesComment.Name' cannot be a zero-length string. The problem is that the value from the previous page in the popup window is not retrieved. I have tried retrieving the name entered and the page does not return anything. The code for the page that is supposed to save data is as follows: Code:
I have a website written in ASP with an MSSQL2000 backend. Recently I moved off of Windows 2000 Server running IIS5 to a Windows2003 Server running IIS6 with SP3.
I transfered my sites data over an all is peachy except I cannot add any new data through the gui. I can edit existing data and delete existing data, but adding is a no go.
The code below is suppose to check to see if an order for a particular user already exist for that day. If it doesn't then it creates a new order number in the webordernum table and inserts the items requested into the weborderlist table. It the ordernum however does exist, it just adds the item to the list....
it gives me an error that reads:
The_connection_cannot_be_used_to_perform_this_oper ation._It_is_either_closed_or_invalid_in_this_cont ext Line 14 (the rs.open line)
I have a form that inserts data into a database...wow, big surprise there, huh? Anywho, my problem is when a user types a word like can't or won't etc.. The single quote obviously throws off the SQL string.
I looked through the forums to see if anyone else had similar problems and I found one. It was suggested to use a replace method upon inserting and then reversing that when reading data from the database. Code:
how can i insert data from a sub form to the fields in the parent form. I am currently to do a search from at the parent form by poping out a new form. When i got the search result, i will need to click on the selected search result and populate into the parent form fields without any refreshing process as it might reset my form.
i have an access db with a "date/time" data type with a format of "Long format"; i want to add the date/time automatically in DB when a user submit a form.
i tried using the xdate = formatdatetime("var",1)
and putting that var in the DB, but i get an error
If IRNvar(0,num) = "True" then IRNvar(0,num) = 1 else IRNvar(0,num) = 0 end if
In my sql database I have a True/False field called VariantFlag which is a bit data type. The IRNvar value is numeric. I am trying to insert the 1 or 0 into the database so that the field shows true or false accordingly but I get a 'Type Mismatch' error. Here's the insert statement:
I want to know how to search a database if a particular data is contained in it and then if the data is not there the page should go ahead to insert the data into the database and then redirect the user to another page but if the data is alraedy there it should go ahead a query another table where the user infomation where also stored.
I am inserting data into Access when user logs on: .............. SQL = "INSERT INTO tblLog (fldUserName,fldTimeIn,fldSID) VALUES ('" & u & "',#" & session("Date") & "#,'" & session.SessionID & "')" con.Execute(SQL) ..................... in here it inserts the date :01/09/2003
But when logging out : ............. SQL="UPDATE tblLog SET fldOffline=1,fldProper=1 WHERE fldUserName= '" & session("admin") & "' AND fldTimeIn=#" & session("date") & "# AND fldOffline=0" con.execute(SQL) ............... it doesn't update the record.If I eliminate the date query here,it updates there is no syntax error is there?
I have two tables Property & Landlord. I have a form and when it is filled in and submitted the information should be sent to the two tables, but i cant seem to get my head around this problem.
I am trying to save arabic data from asp and it's not being saved with right encoding. i tried with both code pages 1252 and 1256. each time i am getting different set of characters in db, but not as i am entering in asp page.
when i retrieve arabic data from database and display in web pages it's showing correct text.
I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store procedure(assume there are many columns in the table).
I need to insert data into two separate tables, the relation between these two tables is 1 row of data in table1 could have multiple rows in table2 related to table1, but if the data insertion into any one of the tables is failed, the transaction will roll back and no data will be remained in any of the tables.
If this needs to be handled in asp program using transact sql, how do I implement it. If I need to it using store procedure, how do I pass the error or success signal to asp program from database.
Does anyone know how I can insert daynamic text box data into a SQL Server database? I have text boxes that are being generated dynamically and I want each of those values inserted into the database that hold the results. I'm not sure how to write my loop statement.
i have a field which accepts the date as dd/mm/yyyy but when i insert the value it becomes mm/dd/yyyy for some date values like 9 april become 4 august.... the database date format is mm/dd/yyyy and i just take the value out and display it as dd/mm/yyyy.. however ...
my update and inserts can't use the same function, cos the function is just display out the server's date as dd/mm/yyyy... how should i add i in correctly? here's my insert and update function[img]images/smilies/bawling.gif[/img] PHP Code:
Dim ddate, ydate, mdateFunction FormatDateDM2MD(sdate) if sdate="" or sdate=" " thenFormatDateDM2MD = "NULL"elseddate=day(sdate)mdate=month(sdate)ydate=year(sdate)sdate= ydate & "/" & mdate & "/" & ddateFormatDateDM2MD = "'"&sdate&"'"end ifEnd Function
i have another problem my date values when its 10 of Nov it comes out as 11/10/2003 instead of 10/11/2003 why? how do i solve it? Code:
i have a field which accepts the date as dd/mm/yyyy but when i insert the value it becomes mm/dd/yyyy for some date values like 9 april become 4 august.... the database date format is mm/dd/yyyy and i just take the value out and display it as dd/mm/yyyy..
however ... my update and inserts can't use the same function, cos the function is just display out the server's date as dd/mm/yyyy... how should i add i in correctly? Code:
I am uploading a file using ASP code. After the user uploads the file, I would like to be able to open the file and check if the data is in a given format (comma separated) and also has all the data elements needed (i.e. all fields are there).
Is there a parse routine in asp that would allow me to do this. The user can upload any type of file as long as I am able to parse it and determine if the data is of the aforemention type.
I have a main page 'album.asp' which server.executes a file 'alicia2.txt'.
I am currently using session variables to move the values of the variables back and forth. I have run into a problem with an array. I currently have : Code:
I have a text field in a web page I am working on that seems to be calculating phone numbers before inserting them into an Access database. i.e., 867-5309 will result as -4442 in the Access text field. My guess is that the webserver or client is processing it before inserting it. Is there any way to stop this other than using a validation script?
I have made a page to display a chart based on data from my SQL-server. I have used Office Web-component graph. Here I can set the correct SQL statement and the graph works fine.
Now I want the user to be able to input the WHERE part of the sql sentence. Can anyone point me to info or code on the web to do this ?
I want to count number of data available depending upon the conditions in the large database the database table rows are approximately 3 lakhs and there are multiple table to be searched and records need to be displayed in ASP pages.
Kindly suggest the best scripting method as i am always getting error like "Script Time Out" Error in Active Server Pages (ASP)
please suggest how to avoid or in sql server i can create some pre defined script and just call from asp pages
I want to export data from SQL Server Database to Access Database through ASP code.
Will it be by running some sort of a batch file?The database structure of both the databases are the same, only there are 3 fields more in the SQL Server DB than the ACCESS DB which need not be exported.
Is there a way to get data submitted to the server without using a form? At the moment I have a very complex form that takes a very long time to load (about 30 seconds), and at intervals I want to send save commands back to the server so that the dynamic information on the page can be saved. The problem is that if I do it the normal way it's frustrating for the user because they have to wait another 30 seconds for the page to reload.
I've also tried using a hidden IFrame and submitting that, but it slows the page's initial load down even more and is causing a bit of an administration nightmare. Also, the program stalls while it waits for a response (success/failure) to come back to the client.