Ask a Question related to ASP.NET General, Design and Development.
-
James J. Foster #1
Re: ado.net beginners question
You'll get that error if the sql statement is empty/blank (in your case,
strCallLog). What is the value of strCallLog when you get that error? You
may want to add in a test for when strCallLog is equal to String.Empty.
--
James J. Foster, DotNetCoders
[url]http://www.dotnetcoders.com[/url]
"Mike P" <mrp@telcoelectronics.co.uk> wrote in message
news:OPS6630VDHA.2168@TK2MSFTNGP09.phx.gbl...> Can anybody tell me what is wrong with this code? The error I get is
> 'CommandText property has not been initialized'.
>
> void BindData(string strCallLog)
> {
> SqlConnection objConnection = new
> SqlConnection(ConfigurationSettings.AppSettings["strConnectTransitTest"]
> );
> SqlDataAdapter objDataAdapter = new SqlDataAdapter(strCallLog,
> objConnection);
>
> DataTable objDataTable = new DataTable();
> objDataAdapter.Fill(objDataTable);
>
> Session["LogData"] = objDataTable;
> dgLog.DataSource = objDataTable;
> dgLog.DataBind();
> }
>
>
> Cheers,
>
> Mike
>
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
James J. Foster Guest
-
Beginners question on LEFT JOINS
Yeah, I know this was KINDA covered in databases, but could somebody give me a refresher of what a left join is in, say, terms of tables FOO and... -
3d beginners question
Hi, what 3d modellers program would you advise me to use with director ON a mac? OR: I already know blender a bit. Is there a way that a... -
Beginners question : controlling an child
I have an 'beginners" question..... I use the following line tot rotate my 3dmax model member("Filename").model("car").rotate(0,0,1,#self) ... -
Beginners question
I am a complete novice at Flash - but thought it a good thing to learn. I am trying to make text move from left to right. I have done this by... -
Beginners question about tables
Hi, When using tables is there a way of fixing cell width and height, I was told there was a 'locking' option. Another related problem is that... -
Mike P #2
Re: ado.net beginners question
Thanks for your help. I've found that I was losing the string value on
postback, so I changed the string to a Session variable and it seems to
work fine.
Cheers,
Mike
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Mike P Guest



Reply With Quote

