Hey all ..
I have actually created a simple database interface for some organization. One feature of the project is to Import data from excel file to sql. I have actually used static query for this. I have defined names of columns;it will import from excel to sql. As Sql tables and fields are also already defined. if user tries to import some file, suppose accidently which has some columns(already defined in query) missing or different, it'd show some error to user.
Actual Problem is that these 'errors are not easily understandable for layman or someone who has no idea about the database' for example, if some column name is missing in file being imported, it will show error: 'invalid column name 'abc'' or 'column name missing' .. as abc is defined in Import/Insert query, but sql couldn't find it in file.Now a layman would assume from this error that there's some thing wrong with this column name, and will try to search it in the file, he is trying to import,which will remain missing for him.. : )
Now what i want is 'solution for this problem', Solution i figured out is to check each error and generate custom text for users which is quite hectic. If there's a better dynamic way to import data from excel to sql, then that can also be a solution of this problem.
Thanks in advance.
View Complete Post