Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Friday, March 30, 2012

MS SQL Unicode HTML Date Type

Hi,

- I hope this is the right place to ask this question, if not please direct me where's the best place to ask it.

I'm using MS SQL 2005 Express, and would like to ask which data type fits best to store HTML texts (+tags) in unicode languages.

I've tried "text" data type- but it changes the unicode texts to ?, on the other hand varchar data types don't seem to accept the html tags.

Thanks,


You may use either varchar/nvarchar or text/ntext to store HTML tags as any other text.

Regard the ? issue you mentioned this is because of the collation you used. Just use the collation that fints the language you have between your HTML tags.

Suggestion: if you can know the max length of your HTML pages, then use varchar/nvarchar otherwise use text/ntext.

Tip: in most cases if you usedNvarchar orNtext; the ? issue will be solved.

Good luck.

|||

Thanks!

|||

Yes, you need to use either nvarchar or ntext.

Collations are for determining the order of characters (and equal) which is used in sorting, and comparing to see if two strings are equal.

Wednesday, March 28, 2012

MS Sql Server User ID, Password and connection string

Hi;
I am making a software (.Net) which is going to connect a ms sql server but I cant conect yet :(.

1- I dont know what I have to type for user id (name)
2- What is my password, it has been long time that I hvae installed it but I dont need any password with Microsoft SQL Server Management Studio Express which has windows authentication option. My software can work via internet or network. So I need to know my user name and password. I am using oledbconnection. Do I need any password?
3- I visited www.connectionstrings.com already so I have the format of it.

Thanks very much for any help...you need to either use your windows account and use the example from connection strings dot com that uses windows auth or you need to go to SQL Server management studio to create a sql server login and password and you will need to give that account access to the specific database you are accessing.

man do the redskins suck.

Monday, March 26, 2012

MS SQL Server JDBC Driver Type 2 and Driver Type 4 Differences

Hi,
Could some please tell me whether Microsoft provides Type 2 and Type 4
jdbc driver ? For Type 4 MS provides
com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the
cofiguration required for type 2 driver and what driver class files
required ?

Its very urgent to me please reply.

AjayHi

I believe that there is only the type 4 driver
http://www.microsoft.com/presspass/...-25MerantPR.asp

available at:
http://www.microsoft.com/downloads/...playEnglishAlso

It complies to the 2.x specification, if you want the 3.0 specification then
you will need to look at the Merant driver
http://www.datadirect.com/products/...final/index.ssp

or other vendors are listed at:
http://servlet.java.sun.com/product...vers/index.html

John

"Ajay" <agupta@.in.ibm.com> wrote in message
news:5cf54350.0411262159.71d2bc8a@.posting.google.c om...
> Hi,
> Could some please tell me whether Microsoft provides Type 2 and Type 4
> jdbc driver ? For Type 4 MS provides
> com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the
> cofiguration required for type 2 driver and what driver class files
> required ?
> Its very urgent to me please reply.
> Ajay

ms sql server database recover

I can recover all type of ms sql server database losing.please contact me at cn9526@.163.netor contact me with msn: paulyang8848@.hotmail.com

I can chat with u.thanks!|||Your mother must be very proud.

I can pat my head and rub my belly at the same time. I'm available for parties. Contact me at:

norespectableITprofessionaluseshotmail102@.hotmail. com

Please keep your advertisements to the Chat forum.sql

Monday, March 19, 2012

MS SQL Parts Database

I am a newbie to the world of SQL Server and I am trying to develop a parts database for computer components. I need tables for each component type (mobo, cpu, memory, hard drives etc.) but I also want to show relation between compatible components (i.e. sata harddrives for mobos that support sata as an example) in my queries and stored views so that if a user selected a Motherboard they can recieve a list of compatible components with that Motherboard. So far I have setup tables for each component, each table has a comp_id (where comp is the component type) and I have a comp_type_id table that stores all of the component id's. Each component table's comp_id column is the primary key relating to the comp_type_id table (which has the foreign key. Is this the way to go or am I completly out of the ball park. Any suggestions or guidence will be greatly apprieciated.I'd recomment NOT creating separate tables for each component. That would be a nightmare to maintain.

Instead, create a single table for storing all components and assigne each component a unique ID. Then have a second table for storing compatibilities with two fields as the primary key: Comp_ID and Compatible_Comp_ID.

This is an ambitious project, and your real challenge will be getting people to enter data religiously. You may think you are making the database more powerful by adding functionality, but you may end up making it such a pain to use and update that the data is never reliable. Just a word to the wise: keep it simple!

blindman|||I see what you mean. I will work that idea out on paper. What kind of index would you use on a table that massive? Also, how do I indicate two primary keys for one table.

Thank you for your suggestions|||You are not assigning two primary keys. You can only have one primary key (the clustered index) because this dictates the order that the data is actually stored in SQL server. Other keys (non-clustered indexes) are stored as separate invisible tables that contain pointers to your actual data. This is why they are slightly slower than clustered indexes in queries, and they also take up additional space.

What you need to do is make the clustered index contain both fields. You can do this easily in Enterprise manager's table designer by selecting both fields and then clicking on the KEY icon.

Some people create a single compound keyfield by concatenating the data from both fields into a third field, but I would recommend against this for a lot of reasons.

As far as the kind of index to use, I like UniqueIdentifers, which are GUIDs (Globally unique IDs). They aren't the shortest type of ID, and they are no fun to type in, but they are efficient and ensure that if you ever have to merge data from multiple databases (production, test, backup, etc) you won't have to worry about duplicate data.

Since you are creating a parts database, I doubt you are going to be dealing with millions of rows of data, so the efficiency of the index is not nearly as important as the functionality and clarity of the design.

blindman

Friday, March 9, 2012

Ms Sql Blob ?

Hi to all

I'm starting ussing Microsoft SQL2000, and i need help about how to insert any type of data file( .xls,.pdf, .jpg, .txt, ...) Into a column to extract later the files on web.

I heared about data tipe BLOB, but i can't find the way to work with it...

I'm lost... some body can help me?

Thanks.I struggled for a long time to try to store images in the SQL 2000 database. After long hours and many frustrations, I decided to leave these kinds of files in the capable hands of the file system. Once I did that, life got a lot easier.

Ling