Showing posts with label sqlexpress. Show all posts
Showing posts with label sqlexpress. Show all posts

Monday, March 26, 2012

multi line rows

Using Visual basic 2005

I have a form and set up my datasource, bindings etc.

All works well, adding, updating, and deleting via form to sqlexpress except.....

I have 2 columns set up in sqlserver that get data from muliline textboxes on my form.

Column 1 "Material" is nvarchar(50)

Column 2 "Quantity" is int

The first multine textbox "Material" works fine, eather updating in the textbox or in the Datagridview cell.

the second multiline textbox "Quantity" works when I just put in a number in the first line of the multiline textbox, when I put in the 2nd number on the second line, nothing gets updated.

I I do that in the datagridview cell (Shift-Enter), I get an error.

"System string was not in correct format".

I tried integer.parse, but that dosn't work. I'm assuming it has something to do with the next line ascii code or something like that.

Can anyone out there help with this

It sounds like the problem is that you are trying to treat a multi-line textbox as a collection of values for when updating to the database... instead of the single long string value.

When saving your results back to the database instead of dealing with the textbox’s Text property, try iterating through each of the lines within its Lines property to pull out each individual value, convert it to a number and then deal with it as needed.

|||

Hi nglow,

Did Brendan's answer resolve your issue? I believe he's correct that the integer field is not going to accept all the lines from your multi-line text box as this is returning a string. The integer field can only hold a single integer number and you seem to be suggesting that you want to put more than one number in it. That won't work.

You either need to limit the text box to a single number, or walk each line in the text box and put each number into a separate row in the database.

Regards,

Mike Wachal
SQL Express team

Mark the best post as Answered.

Monday, March 12, 2012

MSSQLSERVER and SQLExpress coexist?

i had sqlserver2000 (including the enterprise manager and desktop engine) and .net 2003 installed in my development machine, I developed a vb.net application that communicates with a locally hosted mssql db.

recently i had .net 2005 and MS Server 2005 installed, then I converted my application in .net 2005, after, I started having problem deploying the application and db together to client machine and even on my own development machine, it's all database communication sort of problems. (now i have SQL Server Management Studio Express CTP installed)

Did i make any mistake? should i uninstall sqlserver2000, .net 2003 before installing server2005 and .net 2005?

btw, in my explorer, C:\Program Files\Microsoft SQL Server, i have 5 subfolders: "80", "90", "MSSQL", "MSSQL.1" and "MSSQL$SETUPTESTAPPINS". i know that 80 and MSSQL are the folders for server2000, 90 and MSSQL.1 are probably server2005 folders. but what is "MSSQL$SETUPTESTAPPINS"? from the readme.txt i found it's related to server2000, but what is it about?

also, in my registry, HKEY_Local_Machine/Software/Microsoft/Microsoft SQL Server/, the value of "InstalledInstances" is MSSQL SETUP TESTAPPINS SQLEXPRESS, after i removed SQLServer2000 stuff, the key value became "SETUP TESTAPPINS SQLEXPRESS", Now i dont have server2000 in my system anymore, how come SETUP TESTAPPIN is still there?

sorry for my bad explanation, plz help

This question might be better answered in the Setup forum, but from what I can gather from your statements, I don't think you did anything wrong. SQL Server 2000 and SQL Server 2005 will coexist on a single machine, as will the .NET versions. That may be where your issue is.

If you can post the specific errors you're seeing, that might a better place to start.

Buck Woody

|||

Hi,

Yes SQL 2000 and SQL Express / 2005 can coexists, i have MSDE and SQL Express installed on my system, it works without any problem.

Can you post error message from Windows Event Viewer and SQL Server Error Log

Hemantgiri S. Goswami

MSSQLSERVER and SQLExpress coexist?

i had sqlserver2000 (including the enterprise manager and desktop engine) and .net 2003 installed in my development machine, I developed a vb.net application that communicates with a locally hosted mssql db.

recently i had .net 2005 and MS Server 2005 installed, then I converted my application in .net 2005, after, I started having problem deploying the application and db together to client machine and even on my own development machine, it's all database communication sort of problems. (now i have SQL Server Management Studio Express CTP installed)

Did i make any mistake? should i uninstall sqlserver2000, .net 2003 before installing server2005 and .net 2005?

btw, in my explorer, C:\Program Files\Microsoft SQL Server, i have 5 subfolders: "80", "90", "MSSQL", "MSSQL.1" and "MSSQL$SETUPTESTAPPINS". i know that 80 and MSSQL are the folders for server2000, 90 and MSSQL.1 are probably server2005 folders. but what is "MSSQL$SETUPTESTAPPINS"? from the readme.txt i found it's related to server2000, but what is it about?

also, in my registry, HKEY_Local_Machine/Software/Microsoft/Microsoft SQL Server/, the value of "InstalledInstances" is MSSQL SETUP TESTAPPINS SQLEXPRESS, after i removed SQLServer2000 stuff, the key value became "SETUP TESTAPPINS SQLEXPRESS", Now i dont have server2000 in my system anymore, how come SETUP TESTAPPIN is still there?

sorry for my bad explanation, plz help

This question might be better answered in the Setup forum, but from what I can gather from your statements, I don't think you did anything wrong. SQL Server 2000 and SQL Server 2005 will coexist on a single machine, as will the .NET versions. That may be where your issue is.

If you can post the specific errors you're seeing, that might a better place to start.

Buck Woody

|||

Hi,

Yes SQL 2000 and SQL Express / 2005 can coexists, i have MSDE and SQL Express installed on my system, it works without any problem.

Can you post error message from Windows Event Viewer and SQL Server Error Log

Hemantgiri S. Goswami