Help: Inserting Non-english(Hebrew) Characters In MS SQL SERVER 2005

Mar 31, 2008

Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

View 5 Replies


ADVERTISEMENT

HELP: Inserting Non-english(Hebrew) Characters In MS SQL SERVER

Mar 30, 2008

Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate :(
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

View 4 Replies View Related

Help: Inserting Non-english(Hebrew) Characters

Mar 31, 2008

Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

View 2 Replies View Related

Problem With Hebrew Characters

May 21, 2007

Hi,

I tried to transfer data from sqlserver2005 to oracle db.

For this, I have to convert some fields before.

I convert unicode data to nonunicode -

from DT_WSTR to DT_STR.

I began to do it with the wizard and the code page is 1252.

My problem is with the hebrew characters.

when there are hebrew characters in the field, it fails.

This is the error output:

"Text was truncated or one or more characters had no match in the target code page."

I tried to change the code page to 1255,

I changed "AlwaysUseDefaultCodePade" to True.

but I can't solve it.



Do you have any experience with it?

Thanks in advance.

View 3 Replies View Related

SQL Server 2008 :: Trying To Print Records That Have Only English Characters

Jul 17, 2015

I have a small table that looks like this

create table Test(ID number, Name nvarchar(500));
insert into Test(1,'abc testing');
insert into Test(2,'abc include persian آنا اسمیت');
insert into Test(3,'mnp testing');
insert into Test(4,'abc include Russian Джон Тед');

I want to get records that have only english characters i.e ID=1 and 3 only.

I tried select * from Test where Name like '%[a-zA-Z0-9]%' but this will return all 4 records. How can I accomplish this?

View 2 Replies View Related

Non-English Characters

Feb 11, 2006

Hello all,We are developing an add-on for GoldMine, however my problem is ageneric SQL Server problem. The situation is this; we have a database,with collation set to SQL Latin. When we connect to database viaGoldmine, Enterprise Manager or Delphi (through ADO) we cannot seeTurkish characters. When I set SQL Server machine's "Language ForNon-Unicode Programs" setting to Turkish, GoldMine works fine, howeverthere is still problem in EM and Delphi.Does anybody know how to solve this issue?

View 7 Replies View Related

Non English Characters

Sep 27, 2006

Hi,We are developing a small web interface to a local ERP software, whichuses SQL Server 2000 as database. The database uses SQL_Latin1_CP1collation, and the fields are varchar (not nvarchar), however, the mainprogram inserts and reads non-English (Turkish) characters into thesecolumns. However, when we connect to database with ADO.NET, thesecharacters are not read correctly. (The situation is same when I checktables with Enterprise Manager and Query Analyzer)In a past situation (which was about a Win32 application), I have heardabout character conversion behaviour of ADO (and many other DBlibraries) and solved that problem using BDE instead of ADO, so thatthe connection is made via DB-Library instead of OLEDB.But this way cannot be applied to my ASP.NET situation, and there is NOway to change database collation. Must I use a ADO.NET property, or useanother provider, or maybe another library? Any advices? Thanks...

View 4 Replies View Related

SELECT Query Involving Non-English Characters

Apr 8, 2008



Hello friends,

I am inserting non-english strings into my database table from my java program.



Code Snippet
sql = "insert into static_string1 values (?)";
PreparedStatement statement=connection.prepareStatement(sql);
statement.setString(1,statString);




where, statString is a string variable containing Hebrew characters.

Till here, my code works fine. i.e, Hebrew characters are properly inserted to the database.
The problem is when I try to retrieve the String_Id based upon the statString I inserted to the table static_string1.




Code Snippet
String sql = "select String_Id from Static_String1 where String like ('" + statString +"')";
Statement statement=connection.createStatement();
ResultSet rs=statement.executeQuery(sql);
rs.next();
int stringId=rs.getInt("String_Id");


I tried hardcoding the string in the query and to execute it from the SQL Server Management Studio as below



Code Snippetselect String_Id from Static_String1 where String like( ' ×”×–×—' );



But even this is returning null rows, even though the entry is present in the table Please help me out asap.


Please pardon me if this is not the right section to post my doubt. I didnt find any other relevant section here.

View 14 Replies View Related

Inserting Non English Values Using Jdbc

Jan 21, 2006

I am fetching values from a table containing non english characters and inserting the values in another table. Both the tables have the same structure and the column datatype is nvarchar. I am using jdbc jtdc.jar with default parameters. When I query my inserted values, they are junk characters. when I insert values using Query Analyzer the characters are proper. But when i insert using jdbc junk values are stored.

any help would be greatly received.

View 1 Replies View Related

Sql Server 2005 Express In English

Dec 6, 2007



Hi all.
I am in Italy, but I want to download Sql server 2005 Express with advanced services, BOL and Management Studio in English. Is It possible?


Thank you in advance.
Renzo.

View 4 Replies View Related

Lauguage Support In SQL Server 2005 English Ver

Feb 25, 2008

I created a table in SQL server 2005 english version and one of the column stored the chinese characters using nvarchar(X). There is no problem to store the Chinese characters in that column. The question is how I can retrieve the data based on that column data. For example:

select *
from ChinsesCharaterColumn = 'ChinsesCharacter'

Please help!
Alan

View 3 Replies View Related

Inserting Data Having Japanese Characters(Kanji) In SQL Server 2000

Oct 15, 2007



Hi All,
I am working on SQL Server 2000 ver 7.0. The Collation set for my Database Server is Latin.
I want some way by which i can insert Japanese Characters in Database. Is it related to change the Collation or any other encoding format of database.
Suppose the table 'Person' has fields id, Name, city
If i enter name in a japanese characters, then while storing it does not recongnises this format.

insert into person values(8,'満員','osaka')

id name city
8 ?? osaka
At the place of name '??' is displayed.

Please sugggest me a solution for this.


Thanks in Advance Manohar

View 11 Replies View Related

Upgrading Localized MSDE-server To The English Version Of SQL Server Express 2005?

Aug 6, 2007

Hello,

at the moment I have the following problem:
We have installed a version of the MSDE 2000 Sp3 with our software since 2005. Now we install SQL Server Express 2005 in order to use the latest version and to be compatible with Vista.
We have never had any problems with the MSDE, so it was no problem that we installed the german version (by mistake) because there never was any output at installation time.
When we now upgrade the existing MSDE installing the new version of our software, there are often problems and there are error messages, unfortunately in german, which cannot be read by most of our international users.

The problem is, that there seems to be no possibility to upgrade the existing (german) MSDE with the english version of SQL Server Express 2005.
My question is, if it is possible to upgrade the german MSDE to the english SQL Server 2005 to enable our international users to read the error messages at installation time in english?

Thanks in advance.

Best regards,
Peter

View 4 Replies View Related

Inserting/Retrieving Cyrillic Characters

Apr 21, 2008

Hi,
I am using Microsoft SQL Server 2000. I am inserting cyrillic characters in my table by using query analyzer. See sample below:

Column "LangText" is nvarchar data type.

INSERT INTO Sentences (LangText) VALUES ('Поиск')

Problem occurs when I retrieve via query analyzer by using select statement I got "?????" question marks.

View 6 Replies View Related

Inserting Arabic Characters Into A Column

Feb 19, 2007

Hi,
I am trying to insert some arabic characters into one of the tables but after I insert it, it get stored as ?????. What should I do? I have SQL Sever Managment Studio Express running on Windows XP. I appreciate any suggestions!!

Thanks

View 5 Replies View Related

Inserting Arabic Characters In Mssql Table

Sep 18, 2007

I want to insert arabic characters in my sql server db. I need create table and insert syntax to insert arabic characters.
Can anyone help me???

View 3 Replies View Related

Inserting Data - Maximum Characters Exceeded In Statement

Nov 29, 2014

I am new to SQL but have managed to create a table with five columns. The problem I am having is when I try and run the INSERT command I get an error "Maximum characters exceeded in SQL statement"

My table code is:

create table myemployees_MPA0510
(FirstName Varchar (15), LastName
varchar (20), Title varchar (25),
Age number (3), salary number (9));

And my INSERT code is:

Insert into myemployees_MPA0510
(First, Last, Title, Age, Salary)
Values ('Jonie', 'Weber', 'Secretary', 28, 19500.00) ('Potsy', 'Webber', 'Programmer', 32,
45300.00) ('Dirk', 'Smith', 'Programmer II', 45 75020.00) ('Mark', 'Aldridge' 'Technical', 52,
12000.00) ('Peter', 'Wright' 'Admin' 30, 11000.00) ('Lucy', 'May', 'Technical', 15500.00)
('Robert', 'Hurst', 'Finance', 54, 16000.00) ('Ann', 'Green', 'HR', 43, 21000.00);

View 2 Replies View Related

How To Download SQL 2005 Express - English Version?

Apr 5, 2007

I try to download SQL Express but in result get a Russion version . How I could to download English version?



It is good to do to user could make choice: which version he wants .

View 1 Replies View Related

Reg SQL Svr Enterprise Edtn 2005 Win32 English MVL 1 Proc

Mar 30, 2007

Hi,



I have purchased
SQL Svr Enterprise Edtn 2005 Win32 English MVL 1 Proc does it mean that its 32 bit software? and its 1 processor based license ?

Also will it run on HP DL580 G4/(1) Dual-Core 64-bit Intel® Xeon„¢ 7110M Processor (2.60 GHz, 95 Watts, 800MHz FSB) successfully ?

Pls reply urgently

Thanks

View 3 Replies View Related

Working In VB.Net 2005 Inserting NULL Into A Field In Microsoft SQL Server 2005

Feb 2, 2007

I am update/inserting records threw a web form in vb.net. I need to insert 'NULL'  into my microsoft sql server database.  I am not talking about the below line of code where website is the name of my paramater.  If i do that it will just place a blank into that field in the database.  If i dont enter anything into that textbox I want it to to say NULL in that field. So if I go into the actual table in the SQL Server Management Studio and look at the website field of the recored I just added or updated and did not type anything into the web site textbox it needs to say NULL.  I also tried the second line of code but that places a single quote in front and behind NULL. So the field will have the value 'NULL'.
website.value = txtwebsite.text.tostirng
 if txtwebsite.text ="" then
   website.value ="NULL"
end if
The reason why I need the NULL there is because I bind the website filed to a hyperlink template in a gridview.  The actual text of the hyperlink is bound to PAYER which is a name of a insurance payer but the navigateto is bound to the website field.  If i do not enter any data into the website field and it stays as NULL, then when my gridview is loaded, payers that dont have a website will not be underlined and user wont have the option to click on them since there is no value for the navigateto.  But if i use my form to update/add a payer and leave the website textbox blank in puts a blank into that field in my database and when it loads that new row into the gridview the PAYER is underlined and u can click on it but it will just take u to the web site is unavailable page.  So is there anyway to actaull have NULL placed into a filed and not just blank space

View 3 Replies View Related

Hebrew Problems

Feb 18, 2008

hello,

first, sorry about my english...

i've few problems with reports,
i did matrix report with RS2005,
1. i want to align all report to the right, i created dynamic number of columns, and the report expand to the right, i want that it will expand to the left (and the report will be "stick" to the right)
2. i have datetime parameter, in the visual studio every thing is o.k. with dates.
but while i deploy the report to Dynamics CRM reports, while i'm openning the report the date picker is in english and the date format picked is mm/dd/yyyy, after the reports is showing, and i want to change the datetime parameter, the date picker is in hebrew, and the date picked is in format : dd/mm/yyyy - which is o.k. with me.

i don't want the string solution, i have a filling that it's relate to browser or station regional settings or something like that.

3. in drop down list parameter with hebrew word options, option with two words for example will show like that :
instead : "hello world" -> "world hello" (with hebrew letters of course)


thanks,

koby

View 4 Replies View Related

How To Remove Non-Numeric Or Non-alphameric Characters From A String In Sql Server 2005

May 16, 2007

Hi to all,
I am having a string like  (234) 522-4342.
i have to remove the non numeric characters from the above string.
Please help me in this regards.
Thanks in advance.
M.ArulMani
 
 

View 2 Replies View Related

How To Remove Non-Numeric Or Non-alphameric Characters From A String In Sql Server 2005

May 16, 2007

Hi to all,
I am having a string like  (234) 522-4342.
i have to remove the non numeric characters from the above string.
Please help me in this regards.
Thanks in advance.
M.ArulMani
 
 

View 2 Replies View Related

Arabic And Hebrew Search

Apr 13, 2007

am having a problem in searching the database which contains arabic and hebrew text, while the english search works just fine, the arabic and hebrew always return no match. the data is stored and utf-8 the website is at www.allforpeace.org .
 
is their a way to encode the text or what ever ...!! i need help

View 3 Replies View Related

Help With Inserting Data (and A Picture) Into My Sql Server 2005 Database

Feb 2, 2008

Hi,
I have a scenario where I want the current User to add details regarding their house in to my 'Property' table in my database and also store their uploaded picture in the same tabe when they press the 'Add Property' button.  I also want to store the current Users ID in the 'Property' table so the property being added is assigned to the current user.  Can anyone help me with the implementation of this?  Here is the code I have so far:
property.aspx page:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<span style="font-size: 16pt; font-family: Bradley Hand ITC"><strong>Add Property</strong></span><table style="border-right: silver 3px outset; border-top: silver 3px outset; left: 337px;
border-left: silver 3px outset; border-bottom: silver 3px outset; position: relative;
top: 9px">
<tr>
<td colspan="2">
<strong><span style="font-size: 14pt; font-family: Bradley Hand ITC">
Address</span></strong></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="TownLabel" runat="server" Font-Bold="False" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Town:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="TownTextBox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="CityLabel" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="City:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="CityTextBox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="CountyLabel" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="County:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="CountyTextBox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="CountryLabel" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Country:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="CountryTextBox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="PostcodeLabel" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Postcode:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="PostcodeTextBox" runat="server"></asp:TextBox></td>
</tr>
</table>
<asp:Button ID="AddButton" runat="server" Text="Add Property" style="left: 378px; position: relative; top: 66px" /><tablestyle="border-right: silver 3px outset; border-top: silver 3px outset; left: 648px;
border-left: silver 3px outset; border-bottom: silver 3px outset; position: relative;
top: -190px">
<tr>
<td style="width: 186px">
<span style="font-size: 14pt; font-family: Bradley Hand ITC"><strong>Property Description</strong></span></td>
</tr>
<tr>
<td style="width: 186px">
<asp:TextBox ID="DescriptionTextBox" runat="server" Height="172px" Width="233px" TextMode="MultiLine"></asp:TextBox></td>
</tr>
</table><asp:FileUpload ID="PropertyPicture" runat="server" Style="left: 356px; position: relative;
top: -214px" />
<asp:SqlDataSource ID="AddProperty" runat="server" ConnectionString="<%$ ConnectionStrings:My Property PortfolioConnectionString %>"ProviderName="<%$ ConnectionStrings:My Property PortfolioConnectionString.ProviderName %>"
InsertCommand="INSERT INTO Property(User_ID, Property_type, Property_Name, Number_of_Rooms, Sleeps, Town, City, County, Country, Postcode, Description, Facility1, Facility2, Picture)
VALUES (@User_ID, @Property_type, @Property_Name, @Number_of_Rooms, @Sleeps, @Town, @City, @County, @Country, @Postcode, @Description, @Facility1, @Facility2, @Picture)">
<InsertParameters>
<asp:SessionParameter Name="User_ID" />
<asp:ControlParameter ControlID="TypeDropDownList" Name="Property_type" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="PropertyNameTextBox" Name="Property_Name" PropertyName="Text" />
<asp:ControlParameter ControlID="NoOfRoomsDropDownList" Name="Number_of_Rooms" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="SleepsDropDownList" Name="Sleeps" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="TownTextBox" Name="Town" PropertyName="Text" />
<asp:ControlParameter ControlID="CityTextBox" Name="City" PropertyName="Text" />
<asp:ControlParameter ControlID="CountyTextBox" Name="County" PropertyName="Text" />
<asp:ControlParameter ControlID="CountryTextBox" Name="Country" PropertyName="Text" />
<asp:ControlParameter ControlID="PostcodeTextBox" Name="Postcode" PropertyName="Text" />
<asp:ControlParameter ControlID="DescriptionTextBox" Name="Description" PropertyName="Text" />
<asp:ControlParameter ControlID="Facility1DropDownList" Name="Facility1" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="Facility2DropDownList" Name="Facility2" PropertyName="SelectedValue" />
<asp:Parameter Name="Picture" />
</InsertParameters>
</asp:SqlDataSource>
&nbsp;
<table style="left: 12px; position: relative; top: -411px; border-right: silver 3px outset; border-top: silver 3px outset; border-left: silver 3px outset; border-bottom: silver 3px outset;">
<tr>
<td colspan="2">
<strong><span style="font-size: 14pt; font-family: Bradley Hand ITC">
Property Details</span></strong></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="PropertyName" runat="server" Font-Bold="False" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Property Name:" Width="101px"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="PropertyNameTextBox" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="NoOfRooms" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="No of Rooms:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:DropDownList ID="NoOfRoomsDropDownList" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="Sleeps" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Sleeps:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:DropDownList ID="SleepsDropDownList" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="Type" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Type:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:DropDownList ID="TypeDropDownList" runat="server">
<asp:ListItem>Bungelow</asp:ListItem>
<asp:ListItem>Appartment</asp:ListItem>
<asp:ListItem>Flat</asp:ListItem>
<asp:ListItem>Studio</asp:ListItem>
<asp:ListItem>Cottage</asp:ListItem>
<asp:ListItem>House</asp:ListItem>
</asp:DropDownList>&nbsp;
</td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="Facility1" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Facility 1:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:DropDownList ID="Facility2DropDownList" runat="server">
<asp:ListItem>Air conditioning</asp:ListItem>
<asp:ListItem>Dishwasher</asp:ListItem>
<asp:ListItem>En-suit</asp:ListItem>
<asp:ListItem>Garage</asp:ListItem>
<asp:ListItem>Garden</asp:ListItem>
<asp:ListItem>Internet</asp:ListItem>
<asp:ListItem>Pool</asp:ListItem>
</asp:DropDownList>&nbsp;
</td>
</tr>
<tr>
<td style="width: 100px"><asp:Label ID="Facility2Label" runat="server" Height="23px" Style="vertical-align: middle;
text-align: right; font-family: 'Goudy Old Style';" Text="Facility 2:" Width="97px"></asp:Label></td>
<td style="width: 100px">
<asp:DropDownList ID="Facility1DropDownList" runat="server">
<asp:ListItem>Pool</asp:ListItem>
<asp:ListItem>Air conditioning</asp:ListItem>
<asp:ListItem>Dishwasher</asp:ListItem>
<asp:ListItem>En-suit</asp:ListItem>
<asp:ListItem>Garage</asp:ListItem>
<asp:ListItem>Garden</asp:ListItem>
<asp:ListItem>Internet</asp:ListItem>
</asp:DropDownList></td>
</tr></table>
</asp:Content>
property.aspx.vb page:Partial Class Default2
Inherits System.Web.UI.PageProtected Sub AddButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddButton.Click
AddProperty.Insert()End Sub
End Class
Many Thanks

View 2 Replies View Related

Problems Inserting Datetime Object Into Sql Server 2005

Nov 22, 2007

hey everyone,

Im trying run a stored procedure, but I am getting the following message when trying to execute it.

Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.

which seems strange, as there is no integer going to a datetime field. Also, it does not return the value that is incorrect, nor the parameter that is failing. If there is anyway to view this in VS 2005 Team suite, please let me know.

It should also be noted that when I execute this sproc from within sql management studio, it executes fine.

This is the stored procedure im trying to execute...

CREATE PROCEDURE [dbo].[sp_UpdateRequest]

@request_id INT,
@request_client_id INT,
@request_description VARCHAR(150), @request_date DATETIME,
@request_edit_date DATETIME, @request_status VARCHAR(25), @request_approve_date DATETIME,
@request_activity_code VARCHAR(7), @request_department_code VARCHAR(3), @request_participants INT,
@request_activity_date DATETIME, @request_activity_due_date DATETIME,
@request_company_id INT, @request_company_code INT,
@request_notes VARCHAR(2000)

AS
BEGIN

UPDATE invoice_requests

SET request_client_id = @request_client_id,request_description = @request_description,
request_date = @request_date, request_edit_date = @request_edit_date,
request_status = @request_status, request_approve_date = @request_approve_date,
request_activity_code = @request_activity_code,
request_department_code = @request_department_code,
request_participants = @request_participants,
request_activity_date = @request_activity_date,
request_activity_due_date = @request_activity_due_date,
request_company_code = @request_company_code, request_company_id = @request_company_id,
request_notes = @request_notes

WHERE request_id = @request_id

END
GO

in my .net app, all the datetime objects are valid dates, so I could not see why this would be generating the error that it is, so I ran the SQL Profiler, and this was the output. Again, i cannot see where im going wrong...

please note, I have seperated the output from the single slab of text, making sure I didnt remove anything...

exec sp_executesql
N'EXECUTE sp_UpdateRequest
@request_id,
@request_client_id,
@request_description,
@request_date,
@request_edit_date,
@request_status,
@request_approve_date,
@request_activity_code,
@request_participants,
@request_activity_date,
@request_activity_due_date,
@request_company_id,
@request_company_code,
@request_notes',

N'@request_id int,
@request_client_id int,
@request_description varchar(8000),
@request_date datetime,
@request_edit_date datetime,
@request_status varchar(5),
@request_approve_date datetime,
@request_activity_code varchar(8000),
@request_department_code varchar(8000),
@request_participants int,
@request_activity_date datetime,
@request_activity_due_date datetime,
@request_company_id int,
@request_company_code int,
@request_notes varchar(8000)',

@request_id=5,
@request_client_id=1,
@request_description='',
@request_date=''2007-11-22 16:34:32:997'',
@request_edit_date=''2007-11-22 16:34:32:997'',
@request_status='Draft',
@request_approve_date=''1970-01-01 00:00:00:000'',
@request_activity_code='',
@request_department_code='',
@request_participants=0,
@request_activity_date=''2007-11-29 00:00:00:000'',
@request_activity_due_date=''2007-11-23 00:00:00:000'',
@request_company_id=0,
@request_company_code=1,
@request_notes=''

any help on this would be greatly appreciated.
Cheers

View 4 Replies View Related

Problem Inserting Data Into SQL Server 2005 DB From WebForm Controls

Mar 30, 2007

Hello all,
I am having problems running a stored proc from an aspx.cs file. Basically I want to extract data from webForm controls and create a new record in a DB table. I have watched the "Getting Started" videos on thi site, and the only difference between my code and the code of the demonstrator is the connection string.   My conn string:- dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings["ProjectTblConnString"].ConnectionString;Demonstrator conn string:- dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings("ProjectTblConnString");When I debug with the string as shown by the demonstrator the error list reports that ConnectionStrings is a property and I am trying to use it as a mothod, which is fair enough, but I am just confused as how it worked for the demonstrator and not myself. When I debug with the code I used above I get no error, but nothing is inserted in the DB.Also, it looks as if the only class in my aspx.cs file that is actually being executed is PageLoad() - the remainder of the code seems to be ignored. Below is the entired aspx.cs file:- 1 using System;
2 using System.Data;
3 using System.Configuration;
4 using System.Collections;
5 using System.Web;
6 using System.Web.Security;
7 using System.Web.UI;
8 using System.Web.UI.WebControls;
9 using System.Web.UI.WebControls.WebParts;
10 using System.Web.UI.HtmlControls;
11
12 public partial class CreateProject : System.Web.UI.Page
13 {
14 protected void Page_Load(object sender, EventArgs e)
15 {
16
17 if (User.Identity.IsAuthenticated == false)
18 {
19 Server.Transfer("Default.aspx");
20 }
21
22 if (chkbox_startDate.Checked == true)
23 {
24 txtbox_startDate.ReadOnly = true;
25 txtbox_startDate.Text = (System.DateTime.Now.ToString());
26 }
27
28 }
29
30 protected void btn_create_Click(object sender, EventArgs e)
31 {
32 //connection string for connecting to SQL Server DB
33 SqlDataSource dataSrc = new SqlDataSource();
34 dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings["ProjectTblConnString"].ConnectionString;
35
36
37 //insert data in table using the CreateNewProject stored proc in the DB
38 dataSrc.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
39 dataSrc.InsertCommand = "CreateNewProject";
40 dataSrc.InsertParameters.Add("Project_Title", txtbox_title.ToString() );
41 dataSrc.InsertParameters.Add("Description", txtbox_desc.ToString() );
42 dataSrc.InsertParameters.Add("Start_Date", txtbox_startDate.ToString() );
43 dataSrc.InsertParameters.Add("Primary_Dev_Lang", list_devLang.ToString() );
44 dataSrc.InsertParameters.Add("Dev_Environment", list_devEnv.ToString() );
45 dataSrc.InsertParameters.Add("No_Junior_Devs", txtbox_juniorDevs.ToString() );
46 dataSrc.InsertParameters.Add("No_Senior_Devs", txtbox_seniorDevs.ToString() );
47
48 int rowsAffected = 0;
49 try
50 {
51 rowsAffected = dataSrc.Insert();
52 }
53 catch (Exception ex)
54 {
55 Server.Transfer(Error.aspx);
56 }
57 finally
58 {
59 dataSrc = null;
60 }
61
62 if (rowsAffected != 1)
63 {
64 label_confirm.Text = "Error, Contact system admin";
65 }
66 else
67 {
68 label_confirm.Text = "Success";
69 }
70
71 }//end btn_create
72
73 //if cancel is clicked set all values back to default
74 protected void btn_cancel_Click(object sender, EventArgs e)
75 {
76 txtbox_title.Text = "";
77 txtbox_desc.Text = "";
78 txtbox_startDate.Text = "";
79 txtbox_seniorDevs.Text = "";
80 txtbox_juniorDevs.Text = "";
81 list_devEnv.SelectedIndex = 0;
82 list_devLang.SelectedIndex = 0;
83 chkbox_startDate.Checked = true;
84 label_confirm.Text = "";
85 }
86
87 //if checked the current dateTime is inserted into txtbox
88 protected void chkbox_startDate_CheckedChanged(object sender, EventArgs e)
89 {
90 if (chkbox_startDate.Checked == true)
91 {
92 txtbox_startDate.ReadOnly = true;
93 txtbox_startDate.Text = (System.DateTime.Now.ToString());
94 }
95 else
96 {
97 txtbox_startDate.ReadOnly = false;
98 txtbox_startDate.Text = "";
99 }
100 }//end chkox
101
102
103 }//end class
 
Any help anyome can give is greatly appreciated. This is part of my Final Year College Dissertation which is due in 3wks !!!!
Sláinte á chaire,
Seán
 

View 2 Replies View Related

How To Check Integrity Of Data Exported From Csv Before Inserting In Sql Server 2005

Nov 26, 2007

Hi Friends,
I am Ravi, I need a help.
My case is like.. i need to upload data from csv file into sql server 2005 data table.
but before that I need to check integrity of data
for example:
let us say csv data is like
ISD CODE,STATE,NAME,QUALIFICATION
91,AP,KIRAN,MCA
01,MC,MIKE,MS
 
here i have to check that, wether there is an entry in ISD codes table for 91 and 01 (india and us)
similarly AP , MC (Andhra Pradesh and MISSICippi)
please suggest me a nice approach, no of records in ISD codes and States will 350-450 records.
 
thanks in advance
Ravi K

View 3 Replies View Related

Inserting To Multiple Tables In SQL Server 2005 That Use Identity Specification

Feb 20, 2007

Hi, I am having a bit of hassle with trying to enter details to multiple tables in SQL Server 2005.
I have four tables, an
Attendance Table (AttendanceID(PK Identity specific), MembershipNo, Date)
Resistance Table (ResistId(PK Identity specific), Weight , Reps, Sets)
Aerobics Tables(AerobicsID(PK Identity specific), MachineID, Intensity, Time)
and a linking table for all of them.... ExerciseMaster(AttendanceID,ResistanceID,AerobicsI D)

My problem is that I can insert data to each specific table by itself using seperate insert statements.....eg....

//insert an attendance record to the attendance table
string userID;

userID = Session["User"].ToString();

SqlDataSource pgpDataSource = new SqlDataSource();
pgpDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringLogin"].ToString();

pgpDataSource.InsertCommandType = SqlDataSourceCommandType.Text;
pgpDataSource.InsertCommand = "INSERT INTO [Attendance] ([MembershipNo], [Date]) VALUES (@MembershipNo, @Date)";
pgpDataSource.InsertParameters.Add("MembershipNo", userID);
pgpDataSource.InsertParameters.Add("Date", txtVisitDate.Text);

int RowsAffected = 0;

try
{
RowsAffected = pgpDataSource.Insert();
}

catch (Exception ex)
{
Server.Transfer("~/Problem.aspx");
}

finally
{
pgpDataSource = null;
}


//insert an aerobics record into the aerocibs table

SqlDataSource pgpDataSource = new SqlDataSource();
pgpDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringLogin"].ToString();

pgpDataSource.InsertCommandType = SqlDataSourceCommandType.Text;
pgpDataSource.InsertCommand = "INSERT INTO [Aerobics] ([MachineID], [Intensity], [ExerciseTime]) VALUES (@MachineID, @Intensity, @ExerciseTime)";


pgpDataSource.InsertParameters.Add("MachineID", rower.ToString());
pgpDataSource.InsertParameters.Add("Intensity", txtRowerLevel.Text);
pgpDataSource.InsertParameters.Add("ExerciseTime", txtRowerTime.Text);

int RowsAffected = 0;

try
{
RowsAffected = pgpDataSource.Insert();
}

catch (Exception ex)
{
Server.Transfer("~/Problem.aspx");
}

finally
{
pgpDataSource = null;
}
//same code as above for the resistance table

However, i am facing the problem where this does not populate the link table(ExerciseMaster) with any information as i am unable to write the relevant IDs into the table that have been auto generated by SQL Server for each of the subTables.
I have read several forums where they recommend using something called @@IDENTITY but i have no idea how or where to use this in order to fill my exercise table...
Any help would be so much appreciated.... Also, hopefully what i have said all makes sense and someone will be able to help me...oh and one more thing...this is an ASP.NET page coding in C#
Cheers
Scotty

View 8 Replies View Related

Date Format In Sql Server 2000 Italian And English

Jul 23, 2005

I have a Sql Server 2000 installation and my server is Win2k sp2English.If i run a query with WHERE condition, for example,SELECT * FROM TABLE WHERE DATEOFBIRTH ='2004-01-15'my resultset contain the records correct.But the results with the same query, which run on a Sql Server 2000installation with same collation and a server Win2k Italian, is:'La conversione del tipo di dati da char a datetime ha generato unvalore di tipo datetime non compresonell'intervallo di valori validi.'English error:'Converting data type from char to datetime has generated a datetimevalue that is out of range of valid values'It is not possible to change all query in my client application.How I can have the same results for the same query in bothinstallations?Thanks in advantageMaurizio

View 3 Replies View Related

How Can I Get Identitiy Field From Database While Inserting New Row In Sql Server 2005 Compact Edition

Aug 2, 2007



How Can I get Identitiy field from database while inserting new row in sql server 2005 compact edition.

Ex:

I am inserting row in a table through SqlQuery ("insert into ....") in which one of the field is of type Identity which generates number automatically. I want that number to pick up that number and used it in child table....


Any solution for it.


View 10 Replies View Related

How Can I Download English Version Of The SQL Server Express Edition In Germany?

Mar 15, 2007

I am trying to download SQL Server Express Edition in Germany however the site does not allow me to choose the language of the download. How can I get English version of the software in Germany?

http://msdn.microsoft.com/vstudio/express/sql/

this is the link that I am trying to download.

View 3 Replies View Related

Microsoft SQL Server Setup Support Files (English) -- Installation Failed

May 2, 2006

I'm trying in vain to upgrade sql server 2000 to 2005 with great headache and pain.

I (finally) have removed all Beta, and other incompatible version of .NET, Visual Studio and any other offending components, and made it to the first page of the install shield.

The .NET 2.0 components installed fine - but I get a fatal error trying to install the SQL Server Set Support Files.

I do have a log file - and have tired searching on the various error codes in it, but am coming up blank. Please advise - this is taking forever!

sample of error msgs in log file:

MSI (s) (B0:E0) [12:33:06:613]: Note: 1: 1935 2: 3: 0x8002802F 4: 5: CreateAssemblyNameObject 6: Microsoft.NetEnterpriseServers.ExceptionMessageBox,Version="9.0.242.0",processorArchitecture="MSIL",Culture="neutral",PublicKeyToken="89845dcd8080cc91",FileVersion="9.0.1399.0"
MSI (s) (B0:E0) [12:33:06:613]: Product: Microsoft SQL Server Setup Support Files (English) -- Error 2908. The installer has encountered an unexpected error. The error code is 2908. Could not register component {1F3316BE-825B-4390-A9D2-AF3EECCAE9F6}.

MSI (s) (B0:E0) [12:33:06:613]: Executing op: ComponentRegister(ComponentId={52723CBD-3400-458C-988A-4D012E6CAEDB},KeyPath=<Microsoft.SqlServer.WizardFrameworkLite,Version="9.0.242.0",processorArchitecture="MSIL",Culture="neutral",PublicKeyToken="89845dcd8080cc91",FileVersion="9.0.1399.0",State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
Error 2908. The installer has encountered an unexpected error. The error code is 2908. Could not register component {1F3316BE-825B-4390-A9D2-AF3EECCAE9F6}.
MSI (s) (B0:E0) [12:33:06:629]: MSCOREE not loaded loading copy from system32
MSI (s) (B0:E0) [12:33:06:629]: Assembly Error:Function not defined in specified DLL.

MSI (s) (B0:E0) [12:33:06:629]: Note: 1: 1935 2: {52723CBD-3400-458C-988A-4D012E6CAEDB} 3: 0x8002802F 4: 5: CreateAssemblyNameObject 6: Microsoft.SqlServer.WizardFrameworkLite,Version="9.0.242.0",processorArchitecture="MSIL",Culture="neutral",PublicKeyToken="89845dcd8080cc91",FileVersion="9.0.1399.0"
MSI (s) (B0:E0) [12:33:06:629]: Product: Microsoft SQL Server Setup Support Files (English) -- Error 1935. An error occurred during the installation of assembly 'Microsoft.SqlServer.WizardFrameworkLite,Version="9.0.242.0",processorArchitecture="MSIL",Culture="neutral",PublicKeyToken="89845dcd8080cc91",FileVersion="9.0.1399.0"'. Please refer to Help and Support for more information. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, component: {52723CBD-3400-458C-988A-4D012E6CAEDB}

Error 1935. An error occurred during the installation of assembly 'Microsoft.SqlServer.WizardFrameworkLite,Version="9.0.242.0",processorArchitecture="MSIL",Culture="neutral",PublicKeyToken="89845dcd8080cc91",FileVersion="9.0.1399.0"'. Please refer to Help and Support for more information. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, component: {52723CBD-3400-458C-988A-4D012E6CAEDB}
MSI (s) (B0:E0) [12:33:06:629]: User policy value 'DisableRollback' is 0
MSI (s) (B0:E0) [12:33:06:629]: Machine policy value 'DisableRollback' is 0
Action ended 12:33:06: InstallFinalize. Return value 3.

mandpenny

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved