SQLTeam.com | Weblogs | Forums

Sql Error


#1

I have a webform which is attached to a sql db, that when completed it generates a set of Microsoft word documents that have the online form parts inserted into the documents automatically. This all works great when the online form is completed with just numerical characters. However, it does not work when letters and numbers are inputted. The form tables are set to VARCHAR and I have also tried just TEXT, but nothing seems to accept the letters and numbers. I am obviously missing something, but unsure what! Can someone shed some light on this for me.

Thanks


#2

Are you getting any error messages from SQL Server? If so, what is the exact text of the message? If you can post the DDL for the tables and the queries/updates that you are running against those tables, that would help narrow down the problem.


#3

James,

Thanks very much for your reply. Unfortunately you are talking to a novice here, and this little system was created for us by someone who is no longer around. I would love to give you what you are asking for, but I will need a little help actually finding what you need.

Assistance greatly appreciated.

Simon


#4

Without knowing your system, it is hard to tell how to find the queries, but couple of thoughts:

Look in your VB.Net or C# code to see if you can find the query string that it is sending to SQL Server. It might be an explicit insert or update statement, or it might be a stored procedure.

On a dev server, where there is not much activity, launch the SQL Server Profiler and connect to your server. It will be under the Performance Tools folder in your SQL Server program group. Then run the application. You should be able to see the queries that are coming into the server.

In general, if you try to insert or update a value that is non-numeric value into a column whose data type is numeric, SQL Server will throw an error. Usually that error will be handled and reported to the user in the program or in SQL, and if it is not handled, it should show up as an unhandled exception.