Click here to Skip to main content
15,922,630 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to make dll Pin
giotis828-Dec-05 20:53
giotis828-Dec-05 20:53 
GeneralRe: how to make dll Pin
Christian Graus9-Dec-05 10:35
protectorChristian Graus9-Dec-05 10:35 
GeneralRe: how to make dll Pin
giotis8211-Dec-05 21:19
giotis8211-Dec-05 21:19 
GeneralRe: how to make dll Pin
Christian Graus12-Dec-05 10:54
protectorChristian Graus12-Dec-05 10:54 
GeneralRe: how to make dll Pin
giotis8212-Dec-05 22:04
giotis8212-Dec-05 22:04 
GeneralRe: how to make dll Pin
giotis828-Dec-05 21:18
giotis828-Dec-05 21:18 
AnswerRe: how to make dll Pin
uktrips0079-Dec-05 19:18
uktrips0079-Dec-05 19:18 
QuestionProblem with insert command Pin
fitz2345678-Dec-05 2:13
fitz2345678-Dec-05 2:13 
Hi All,

Hope someone can help me on this I have written an insert command in VB for a connection to a MySQL database here is the code -

cmdSelect = cnn.CreateCommand
cmdSelect.CommandText = "SELECT Transaction_No, User_ID, Expiry_Date, " & _
"Expiry_Date_Hex, Product_ID, Update_Date, Key_Serial_No, Developer_ID, " & _
"Locking_Code, Unlock_Code FROM KeyIssueDetails"
mda.SelectCommand = cmdSelect





cmdInsert = cnn.CreateCommand
cmdInsert.CommandText = "INSERT INTO KeyIssueDetails(Transaction_No, User_ID, Expiry_Date, Expiry_Date_Hex, Product_ID, Update_Date, Key_Serial_No, Developer_ID, Locking_Code, Unlock_Code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Transaction_No", Microsoft.Data.Odbc.OdbcType.Int, 0, "Transaction_No"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("User_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "User_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Expiry_Date", Microsoft.Data.Odbc.OdbcType.DateTime, 0, "Expiry_Date"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Expiry_Date_Hex", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Expiry_Date_Hex"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Product_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Product_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Update_Date", Microsoft.Data.Odbc.OdbcType.DateTime, 0, "Update_Date"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Key_Serial_No", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Key_Serial_No"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Developer_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Developer_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Locking_Code", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Locking_Code"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Unlock_Code", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Unlock_Code"))
'
mda.InsertCommand = cmdInsert
prm.SourceVersion = DataRowVersion.Original
prm.Direction = ParameterDirection.Output
mda.Fill(mds, "KeyIssueDetails")
DGMain.DataSource = mds
DGMain.DataMember = "KeyIssueDetails"

My Problem is that the command works fine bar the last parameter. "Unlock_Code" comes back as NULL even though the dataset accepts the data I enter. I am fairly new to this so I may just be missing something obvious but any help would be great I can't figure out where I went wrong.D'Oh! | :doh:
Questiondll registration problem Pin
uktrips0077-Dec-05 21:47
uktrips0077-Dec-05 21:47 
Questionregistering dll problem Pin
uktrips0077-Dec-05 21:46
uktrips0077-Dec-05 21:46 
AnswerRe: registering dll problem Pin
Gerben Jongerius7-Dec-05 22:08
Gerben Jongerius7-Dec-05 22:08 
GeneralRe: registering dll problem Pin
uktrips0077-Dec-05 22:15
uktrips0077-Dec-05 22:15 
GeneralRe: registering dll problem Pin
Gerben Jongerius7-Dec-05 22:48
Gerben Jongerius7-Dec-05 22:48 
GeneralRe: registering dll problem Pin
uktrips0077-Dec-05 23:32
uktrips0077-Dec-05 23:32 
GeneralRe: registering dll problem Pin
Gerben Jongerius8-Dec-05 2:17
Gerben Jongerius8-Dec-05 2:17 
JokeRe: registering dll problem Pin
uktrips0079-Dec-05 0:42
uktrips0079-Dec-05 0:42 
GeneralRe: registering dll problem Pin
uktrips0079-Dec-05 2:24
uktrips0079-Dec-05 2:24 
AnswerRe: registering dll problem Pin
Gerben Jongerius9-Dec-05 7:22
Gerben Jongerius9-Dec-05 7:22 
GeneralRe: registering dll problem Pin
uktrips0079-Dec-05 18:59
uktrips0079-Dec-05 18:59 
QuestionAlternative of Debug.Print() in .Net Pin
kumar_Chandan7-Dec-05 19:35
kumar_Chandan7-Dec-05 19:35 
AnswerRe: Alternative of Debug.Print() in .Net Pin
Dave Kreskowiak8-Dec-05 4:24
mveDave Kreskowiak8-Dec-05 4:24 
Question[Message Deleted] Pin
kumar_Chandan7-Dec-05 19:25
kumar_Chandan7-Dec-05 19:25 
AnswerRe: ListBox in .Net Pin
Gerben Jongerius7-Dec-05 21:52
Gerben Jongerius7-Dec-05 21:52 
QuestionExporting data to msword Pin
sreejaps7-Dec-05 19:22
sreejaps7-Dec-05 19:22 
AnswerRe: Exporting data to msword Pin
uktrips0077-Dec-05 22:00
uktrips0077-Dec-05 22:00 

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.