Click here to Skip to main content
15,885,278 members
Home / Discussions / Database
   

Database

 
AnswerRe: Get Secure data from host Pin
Farhan Noor Qureshi12-Dec-05 12:53
Farhan Noor Qureshi12-Dec-05 12:53 
QuestionHow to call another stored procedure within a sql server extended stored procedure? Pin
Xiangyang Liu 刘向阳12-Dec-05 10:03
Xiangyang Liu 刘向阳12-Dec-05 10:03 
AnswerRe: How to call another stored procedure within a sql server extended stored procedure? Pin
anandss13-Dec-05 9:20
anandss13-Dec-05 9:20 
GeneralRe: How to call another stored procedure within a sql server extended stored procedure? Pin
Xiangyang Liu 刘向阳14-Dec-05 4:11
Xiangyang Liu 刘向阳14-Dec-05 4:11 
QuestionStoredProcedure error Pin
R. A. Abbasi12-Dec-05 6:24
R. A. Abbasi12-Dec-05 6:24 
AnswerRe: StoredProcedure error Pin
Al Ortega12-Dec-05 6:59
Al Ortega12-Dec-05 6:59 
GeneralRe: StoredProcedure error Pin
R. A. Abbasi12-Dec-05 7:13
R. A. Abbasi12-Dec-05 7:13 
QuestionProblem with Insert Command Pin
fitz23456711-Dec-05 22:56
fitz23456711-Dec-05 22:56 
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:

QuestionGenerate “Dataset” of Enterprise .Net Windows Application Problem Pin
Fariborz Golara11-Dec-05 22:25
Fariborz Golara11-Dec-05 22:25 
AnswerRe: Generate "Dataset" of Enterprise .Net Windows Application Problem Pin
Colin Angus Mackay12-Dec-05 4:53
Colin Angus Mackay12-Dec-05 4:53 
GeneralThank you Colin Pin
Fariborz Golara12-Dec-05 8:08
Fariborz Golara12-Dec-05 8:08 
QuestionDatabase table audit in SQL 2000 Pin
sumitjh11-Dec-05 22:01
sumitjh11-Dec-05 22:01 
QuestionAdo.net sqldatareader not working Pin
kal13na1311-Dec-05 21:59
kal13na1311-Dec-05 21:59 
AnswerRe: Ado.net sqldatareader not working Pin
miah alom12-Dec-05 4:16
miah alom12-Dec-05 4:16 
GeneralRe: Ado.net sqldatareader not working Pin
kal13na1312-Dec-05 18:49
kal13na1312-Dec-05 18:49 
GeneralRe: Ado.net sqldatareader not working Pin
miah alom13-Dec-05 3:49
miah alom13-Dec-05 3:49 
Questionstored procedure problem Pin
kal13na1311-Dec-05 21:39
kal13na1311-Dec-05 21:39 
AnswerRe: stored procedure problem Pin
Fariborz Golara11-Dec-05 22:33
Fariborz Golara11-Dec-05 22:33 
QuestionPassword Pin
kenexcelon11-Dec-05 6:53
kenexcelon11-Dec-05 6:53 
AnswerRe: Password Pin
Colin Angus Mackay11-Dec-05 21:03
Colin Angus Mackay11-Dec-05 21:03 
AnswerRe: Password Pin
Al Ortega12-Dec-05 13:04
Al Ortega12-Dec-05 13:04 
QuestionArchitecture of .Net windows applications problem Pin
Fariborz Golara11-Dec-05 4:47
Fariborz Golara11-Dec-05 4:47 
AnswerRe: Architecture of .Net windows applications problem Pin
Colin Angus Mackay11-Dec-05 4:50
Colin Angus Mackay11-Dec-05 4:50 
GeneralRe: Architecture of .Net windows applications problem Pin
Michael P Butler11-Dec-05 5:03
Michael P Butler11-Dec-05 5:03 
GeneralRe: Architecture of .Net windows applications problem Pin
Colin Angus Mackay11-Dec-05 6:05
Colin Angus Mackay11-Dec-05 6:05 

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.