Click here to Skip to main content
15,880,608 members
Home / Discussions / Database
   

Database

 
Generaldate Pin
Anonymous30-Oct-03 6:30
Anonymous30-Oct-03 6:30 
GeneralRe: date Pin
andyharman3-Nov-03 11:26
professionalandyharman3-Nov-03 11:26 
GeneralIDbCommand.CommandTimeOut Pin
yyf30-Oct-03 4:21
yyf30-Oct-03 4:21 
GeneralRe: IDbCommand.CommandTimeOut Pin
Mike Dimmick30-Oct-03 4:59
Mike Dimmick30-Oct-03 4:59 
GeneralRe: IDbCommand.CommandTimeOut Pin
yyf30-Oct-03 8:07
yyf30-Oct-03 8:07 
QuestionProblem in connection string??? Pin
d meenakshi29-Oct-03 18:53
d meenakshi29-Oct-03 18:53 
GeneralRows Pin
Anonymous29-Oct-03 9:17
Anonymous29-Oct-03 9:17 
GeneralUpdate and select in same procedure with a dataadapter Pin
MrDanJordan29-Oct-03 5:49
MrDanJordan29-Oct-03 5:49 
For my test i have created the following stored procedure which is called through a (sqldataconnection, sqldataadater and dataset) created with tthe wizerd. I have also placed a datagrid on the form which thes properties point back to the relivent datasource, datamember and datakeyfield. I have utilized a label to display errors which is telling me that there are now rows to populate the datagrid with.

If I select the dataadapter and run the preview data option (fill in all of the stored procedure variables and click fill data set the table will display the Log_ID value of the record added to the db (value a uniqueid field created by the sql default setting command of (newid()) when a record is added.

***Question why cant i populate the datagrid with the value thacan see when previwing the data through the dataadapter?

--===================================
CREATE PROCEDURE dbo.tsi_spASPautolg
(
@log_date datetime,
@cl_temp nvarchar(255),
@user nvarchar(50),
@domain nvarchar(25),
@pc nvarchar(25),
@ip nvarchar(15),
@mac nvarchar(20)
)
AS
SET NOCOUNT ON;
Insert Into aspAutoLog (Login_datetime, cl_temp, cl_user, cl_domain, cl_pc, cl_ip, cl_mac)
Values (@log_date,@cl_temp,@user,@domain,@pc,@ip,@mac)
SELECT Log_ID From aspAutoLog WHERE login_datetime = @log_date
GO
--===========================================================

On my form I run the following code with a button click:

Try
SqlDataAdapter1.SelectCommand.Parameters("@log_date").Value = Now()
SqlDataAdapter1.SelectCommand.Parameters("@cl_temp").Value = "C:\DOCUME~1\DANJOR~1\LOCALS~1\Temp"
SqlDataAdapter1.SelectCommand.Parameters("@user").Value = "Dan Jordan"
SqlDataAdapter1.SelectCommand.Parameters("@domain").Value = "DEVZONE-DCJXP"
SqlDataAdapter1.SelectCommand.Parameters("@pc").Value = "DEVZONE-DCJXP"
SqlDataAdapter1.SelectCommand.Parameters("@ip").Value = "10.116.105.109"
SqlDataAdapter1.SelectCommand.Parameters("@mac").Value = "00-00-39-5F-7B-3D"
SqlDataAdapter1.Fill(DataSet11, "Log_id")
DataGrid1.DataBind()
DataGrid1.Visible = True

Catch eFillError As System.Exception

Label1.Text = (eFillError.ToString)
Finally
End Try


Thank you for any insite into my confused state...
GeneralHelp, why sql server is pending..... Pin
yyf29-Oct-03 4:09
yyf29-Oct-03 4:09 
GeneralRe: Help, why sql server is pending..... Pin
Jeff Varszegi3-Nov-03 15:07
professionalJeff Varszegi3-Nov-03 15:07 
Generalabout connection pooling Pin
yyf28-Oct-03 10:12
yyf28-Oct-03 10:12 
QuestionThe functions in ADO.NET are asynchronism or synchronism? Pin
yyf28-Oct-03 9:14
yyf28-Oct-03 9:14 
GeneralDebugging a Stored Proc Pin
Dave S28-Oct-03 3:10
Dave S28-Oct-03 3:10 
GeneralRe: Debugging a Stored Proc Pin
Mike Dimmick28-Oct-03 3:15
Mike Dimmick28-Oct-03 3:15 
GeneralRe: Debugging a Stored Proc Pin
Jörgen Sigvardsson30-Oct-03 9:33
Jörgen Sigvardsson30-Oct-03 9:33 
GeneralDataTable.Select Pin
Ryan_Roberts28-Oct-03 2:41
Ryan_Roberts28-Oct-03 2:41 
GeneralPlease point me in the right direction... Pin
frank2127-Oct-03 9:00
frank2127-Oct-03 9:00 
GeneralRe: Please point me in the right direction... Pin
Aryo Handono31-Oct-03 3:15
professionalAryo Handono31-Oct-03 3:15 
Generalconnection pooling Pin
yyf27-Oct-03 7:59
yyf27-Oct-03 7:59 
GeneralRe: connection pooling Pin
Jörgen Sigvardsson30-Oct-03 9:38
Jörgen Sigvardsson30-Oct-03 9:38 
GeneralProcess SQL Transactions?? Easy Question :) Pin
mittalpa27-Oct-03 6:41
mittalpa27-Oct-03 6:41 
GeneralRe: Process SQL Transactions?? Easy Question :) Pin
Mike Dimmick28-Oct-03 2:13
Mike Dimmick28-Oct-03 2:13 
GeneralRe: Process SQL Transactions?? Easy Question :) Pin
mittalpa28-Oct-03 3:17
mittalpa28-Oct-03 3:17 
GeneralMemory Leak! Pin
Kevin Gutteridge27-Oct-03 0:36
Kevin Gutteridge27-Oct-03 0:36 
GeneralRe: Memory Leak! Pin
Mike Dimmick28-Oct-03 3:00
Mike Dimmick28-Oct-03 3: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.