Click here to Skip to main content
15,916,188 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to add all fonts in a combo Pin
eyes200731-Jul-07 5:51
eyes200731-Jul-07 5:51 
GeneralRe: how to add all fonts in a combo Pin
Luc Pattyn31-Jul-07 6:14
sitebuilderLuc Pattyn31-Jul-07 6:14 
GeneralRe: how to add all fonts in a combo Pin
Dave Kreskowiak31-Jul-07 6:59
mveDave Kreskowiak31-Jul-07 6:59 
GeneralRe: how to add all fonts in a combo Pin
The Man from U.N.C.L.E.31-Jul-07 8:05
The Man from U.N.C.L.E.31-Jul-07 8:05 
GeneralRe: how to add all fonts in a combo Pin
eyes200731-Jul-07 19:51
eyes200731-Jul-07 19:51 
QuestionEmailing data Pin
IETaxguard31-Jul-07 4:02
IETaxguard31-Jul-07 4:02 
AnswerRe: Emailing data Pin
Dave Kreskowiak31-Jul-07 7:18
mveDave Kreskowiak31-Jul-07 7:18 
Questioninserting records using vb.net Pin
jds120731-Jul-07 3:41
jds120731-Jul-07 3:41 
I am trying to insert record into and SQL Server 2000 database and I keep getting the following error:

Cannot insert the value NULL into column 'ItemID', table 'RAM.dbo.Item_JS'; column does not allow nulls. INSERT fails.
The statement has been terminated.

The column ItemID is set to autonumber in the db. Here is my code:

Dim myConnString As String = "Data Source=********;Initial Catalog=******;User ID=*****;Password=*****;"<br />
<br />
Dim myInsertQuery As String = "INSERT INTO Item_JS (ItemPartNumber, ItemSourceCode,       ItemSupercede, ItemCost, ItemName, ItemListPrice, ItemLastUpdateDT, ItemStatus, ItemCreationDt, CompanyID, StoreID, BrandID, PackageID) VALUES('" & Trim(partnumber) & "', '" & Trim(sourcecode) & "', '" & Trim(supercede) & "', CONVERT(MONEY,'" & cost & "'), '" & Trim(itemname) & "', CONVERT(MONEY,'" & listprice & "'), '" & Trim(lastupdateDt) & "', '" & Trim(status) & "', '" & Trim(insertdate) & "', '" & Trim(companyID) & "', '" & Trim(storeID) & "', '" & Trim(brandID) & "', '" & Trim(packageID) & "'" & ")"<br />
<br />
Dim myConnection As New SqlConnection(myConnString)<br />
myConnection.Open()<br />
Dim myCommand As New SqlCommand(myInsertQuery, myConnection)<br />
myCommand.ExecuteNonQuery()<br />
myConnection.Close()


Any Ideas?

jds1207
AnswerRe: inserting records using vb.net Pin
Tim Carmichael31-Jul-07 3:50
Tim Carmichael31-Jul-07 3:50 
QuestionThe Scope of the Adapter in the Following code Pin
Vimalsoft(Pty) Ltd31-Jul-07 3:16
professionalVimalsoft(Pty) Ltd31-Jul-07 3:16 
AnswerRe: The Scope of the Adapter in the Following code Pin
Dave Kreskowiak31-Jul-07 7:13
mveDave Kreskowiak31-Jul-07 7:13 
Questionmove the toolbar in program Pin
eyes200731-Jul-07 1:29
eyes200731-Jul-07 1:29 
AnswerRe: move the toolbar in program Pin
Tom Deketelaere31-Jul-07 1:46
professionalTom Deketelaere31-Jul-07 1:46 
GeneralRe: move the toolbar in program Pin
eyes200731-Jul-07 2:46
eyes200731-Jul-07 2:46 
GeneralRe: move the toolbar in program Pin
MartyK200731-Jul-07 3:17
MartyK200731-Jul-07 3:17 
GeneralRe: move the toolbar in program Pin
Tom Deketelaere31-Jul-07 3:25
professionalTom Deketelaere31-Jul-07 3:25 
GeneralRe: move the toolbar in program Pin
Tom Deketelaere31-Jul-07 20:59
professionalTom Deketelaere31-Jul-07 20:59 
GeneralRe: move the toolbar in program [modified] Pin
eyes200731-Jul-07 4:22
eyes200731-Jul-07 4:22 
QuestionUpdating a control via a Thread Pin
portech31-Jul-07 1:08
portech31-Jul-07 1:08 
AnswerRe: Updating a control via a Thread Pin
Luc Pattyn31-Jul-07 1:15
sitebuilderLuc Pattyn31-Jul-07 1:15 
QuestionSet focus to a tabpage Pin
Sadiq Parker31-Jul-07 0:40
Sadiq Parker31-Jul-07 0:40 
AnswerRe: Set focus to a tabpage Pin
Christian Graus31-Jul-07 0:47
protectorChristian Graus31-Jul-07 0:47 
GeneralRe: Set focus to a tabpage [modified] Pin
Tom Deketelaere31-Jul-07 1:39
professionalTom Deketelaere31-Jul-07 1:39 
GeneralRe: Set focus to a tabpage Pin
SamRST31-Jul-07 4:12
SamRST31-Jul-07 4:12 
GeneralRe: Set focus to a tabpage Pin
Tom Deketelaere31-Jul-07 4:47
professionalTom Deketelaere31-Jul-07 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.