| | |
MS SQL insertion via VB (Query question)
Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2007
Posts: 49
Reputation:
Solved Threads: 2
I am trying to insert tables into a database that I created at runtime, I am using MS SQL Server Express, and I have tested this query and it works, in the sense that a table is created. However the small text field (stringText [char]) only has a length of 1, that is not very useful... When I try to specify a length i.e. varchar(MAX) or varchar(255) or any other value really it gives me an error that Column, parameter, or variable #2: Cannot find data type varchar(255).
I have set up a msg box to show the SQL that I generate whenever I run the program. It is as follows:
Any questions about something I may have left out will be happily answered, and any help that is given, thank you in advance.
I have set up a msg box to show the SQL that I generate whenever I run the program. It is as follows:
MS SQL Syntax (Toggle Plain Text)
--------------------------- Portfolio Generator 3.0 --------------------------- Inserting INTO DATABASE: BEGIN TRANSACTION CREATE TABLE [dbo].[testTable] ( [testTableID] [int] NOT NULL PRIMARY KEY, stringText [char] NULL DEFAULT (''), largeText [text] NULL DEFAULT (''), integerVal [int] NULL DEFAULT ((0)), doubleVal [int] NULL DEFAULT ((0)), dateVal [datetime] NULL DEFAULT (04/25/2008), boolVal [tinyint] NULL DEFAULT ((0))) COMMIT
Any questions about something I may have left out will be happily answered, and any help that is given, thank you in advance.
Mr.Wobbles~
![]() |
Similar Threads
- SQL Help (MySQL)
Other Threads in the MS SQL Forum
- Previous Thread: Need help SQL Assignment
- Next Thread: Sql Sort Query....
| Thread Tools | Search this Thread |





