Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Monday, March 26, 2012

Microsoft OLE DB Provider for SQL Server error '80040e14'

I am trying to add data from a form with 8 text boxes.
Each text box needs to allow atleast 2000 characters to be
entered. When trying to save this data to a record in my
database I get the following error: Microsoft OLE DB
Provider for SQL Server error '80040e14' Cannot create a
row of size 8858 which is greater than the allowable
maximum of 8060.
Is there a way around this?
Thanks."Chris" <christopherhebrard@.hotmail.com> wrote in message
news:046e01c39f45$63a6a010$a401280a@.phx.gbl...
> I am trying to add data from a form with 8 text boxes.
> Each text box needs to allow atleast 2000 characters to be
> entered. When trying to save this data to a record in my
> database I get the following error: Microsoft OLE DB
> Provider for SQL Server error '80040e14' Cannot create a
> row of size 8858 which is greater than the allowable
> maximum of 8060.
>
8060 is the maximum row size for any table in SQLServer. You can
-use TEXT instead of VARCHAR columns (TEXT data is not stored on the row).
-break your table into multiple tables and spread out your varchar columns.
David|||Thanks for your help, very much apreciated. Its funny that
I spent about an hour researching this problem, and all I
had to do was try the text type. :)
>--Original Message--
>"Chris" <christopherhebrard@.hotmail.com> wrote in message
>news:046e01c39f45$63a6a010$a401280a@.phx.gbl...
>> I am trying to add data from a form with 8 text boxes.
>> Each text box needs to allow atleast 2000 characters to
be
>> entered. When trying to save this data to a record in
my
>> database I get the following error: Microsoft OLE DB
>> Provider for SQL Server error '80040e14' Cannot create a
>> row of size 8858 which is greater than the allowable
>> maximum of 8060.
>8060 is the maximum row size for any table in SQLServer.
You can
>-use TEXT instead of VARCHAR columns (TEXT data is not
stored on the row).
>-break your table into multiple tables and spread out
your varchar columns.
>David
>
>.
>

Monday, March 19, 2012

Microsoft Association rules importing to web form

hi

I am using Microsoft association algorithm to find the association between PATIENT CITY > likely Disease. I like to know how can i import association model after creating from SQL Server BI studio to use in my ASP.NET web form? such a way when the user enters PATIENT CITY, system prompts associated Disease.

I do have Data mining with SQL Server 2005 book, could't find any resource for my objective.

Please suggest best source or tutorial how can i do

your help and insight is highly appreciated.

Raju

Please see Bogdan's suggestions on this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=650506&SiteID=1

Friday, March 9, 2012

method call works from .Net form and not from SQL CLR - EnterpriseLibrary used

Hello

I created a wrapper class for a function, and exposed it through CLR. However, if I call this function form SQL it blows up but if I call directly from a test Windows Form the call works fine.

The blow up is related to EnterpriseLibrary.Data, where my Queue class uses that library to do all data access call ops

Here's my wrapper class:

namespace inlineCLRsql{

public static class Wrapper{

public static void CallQueueEntry(int queueId, int deskNo, int missed){

inLineLib.Queue oQueue;

inLineLib.QueueEntry oQueueEntry;

oQueue = new inLineLib.Queue(queueId);

oQueueEntry = oQueue.callQueueEntry(deskNo, false);

Microsoft.SqlServer.Server.SqlContext.Pipe.Send(oQueueEntry.queueNum.ToString());

}

}

And this is my CLR SQL creation code:

CREATE PROC sp_CallQueueEntry

@.queueId int,

@.deskNo int,

@.missed int

AS

EXTERNAL NAME inLineLib.[inlineCLRsql.Wrapper].CallQueueEntry

GO

sp_CallQueueEntry 4,2,0

Here is what I get as a result

System.NullReferenceException: Object reference not set to an instance of an object.

System.NullReferenceException:

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.get_DefaultName()

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp[TTypeToBuild](IReadWriteLocator locator, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, IConfigurationSource configurationSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IConfigurationSource configurationSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.CreateDefault()

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase()

at inLineLib.Queue.getNextQueueEntry(Int32 servedBy)

at inLineLib.Queue.callQueueEntry(Int32 servedBy, Boolean callMissed)

at inlineCLRsql.Wrapper.CallQueueEntry(Int32 queueId, Int32 deskNo, Int32 missed)

What can I do to fix this?

Cheers

M

This is almost a total guess - I've never used EntLib. However, I found some one else hit this issue when EntLib was not able to find the database in the application config file: http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21833370.html

This is likely to be the same problem you're facing. I believe you can solve this by running the Enterprise Library Config tool and specify your config file as sqlservr.exe.config in the same directory as sqlservr.exe. Or you can try copying and renaming the config file your Windows Form app is using.

Hope this works.

Steven

Wednesday, March 7, 2012

Metadata

Hi!

I need to pull out some metada from database. From every table I want to pull out relations so PK and FK. But I want to have it in form that I will exactly now that FooId is PK in Foo table nad FooBarId is foreign key from FooBar table and so on. And I need it for specified tables.

It can be done by one or more queries for every table so it doesn't have to be one big select. I just need to know how to get this data ;)

TIA

Jarod

you can use SSMS to generate script for all your objects in your database.

Steps:

(1) go to object explorer

(2) select the databse

(3) right click and choose tasks and then choose the subtask 'Generate Scripts....

(4) This wizard will walk you thru the script generation