|
how can we connect sybase through asp.net
please explain with the example.
it includes Connectionstring,commandtext,parameter and result.
|
|
|
|
|
you can use the generic classes to connect to any ODBC data source. What have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Dim oConn As Data.Odbc.OdbcConnection
Dim oCmd As New Odbc.OdbcCommand
Dim oDa As New Odbc.OdbcDataAdapter
oConn = New Data.Odbc.OdbcConnection("Driver={SYBASE ASE ODBC Driver};NA=SYBASESVR,5000;Uid=myuid;Pwd=mypwd")
'oConn = New Data.Odbc.OdbcConnection("Data Source='myASEserver';Port=5000;Database=SYBASESVR;Uid=myuid;Pwd=mypwd")
'oConn = New Data.Odbc.OdbcConnection("Data Source=\\SYBASESVR\myvolume\mypat\mydd.add;User ID=myuid;Password=mypwd;ServerType=REMOTE")
oCmdStr = "select * from docu..cntr where cntr_id_c = '090528000001'"
'oCmd = New Data.Odbc.OdbcCommand(sql, oConn)
oCmd.CommandType = Data.CommandType.Text
Dim rs As SqlDataReader
'oConn = New Odbc.OdbcConnection(oConStr)
oConn.Open()
oDa = New Odbc.OdbcDataAdapter(oCmdStr, oConn)
ds = New DataSet
oDa.SelectCommand.CommandText = oCmdStr
oDa.Fill(ds)
TextBox1.Text = CType(Math.Round(ds.Tables(0).Rows(0).Item("cntr_n_c"), 1), String)
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
|
|
|
|
|
|
Dim oConn As Data.Odbc.OdbcConnection
Dim oCmd As New Odbc.OdbcCommand
Dim oDa As New Odbc.OdbcDataAdapter
oConn = New Data.Odbc.OdbcConnection("Driver={SYBASE ASE ODBC Driver};NA=SYBASESVR,5000;Uid=myuid;Pwd=mypwd")
'oConn = New Data.Odbc.OdbcConnection("Data Source='myASEserver';Port=5000;Database=SYBASESVR;Uid=myuid;Pwd=mypwd")
'oConn = New Data.Odbc.OdbcConnection("Data Source=\\SYBASESVR\myvolume\mypat\mydd.add;User ID=myuid;Password=mypwd;ServerType=REMOTE")
oCmdStr = "select * from docu..cntr where cntr_id_c = '090528000001'"
'oCmd = New Data.Odbc.OdbcCommand(sql, oConn)
oCmd.CommandType = Data.CommandType.Text
Dim rs As SqlDataReader
'oConn = New Odbc.OdbcConnection(oConStr)
oConn.Open()
oDa = New Odbc.OdbcDataAdapter(oCmdStr, oConn)
ds = New DataSet
oDa.SelectCommand.CommandText = oCmdStr
oDa.Fill(ds)
TextBox1.Text = CType(Math.Round(ds.Tables(0).Rows(0).Item("cntr_n_c"), 1), String)
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
|
|
|
|
|
Hi
Want to know how to disable session/cookies for a specific page in webapp. is it possible to do and how?
Thanks in advance.
Satish
|
|
|
|
|
I don't see how this question makes any sense at all. If you don't access a cooke and/or your session object, then how are they 'enabled' ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I have an asp.net page with update panel triggered with tick event of timer. The update panel contains 2 label controls and are used to show progress of a service running on the system.
I need a btn which should be disabled when the service is running and the task is in progress (onoff btn for service), otherwise when service is idle, it should be enabled. The btn is in a different portion of the page, so i added another updatepanel2 for it. i didn't assign any trigger to updatepanel2.
Now in tick event (trigger for updatepanel1), i want to enable/disable btn. Problem is that the btn gets disabled but it doesn't get enabled at tick event when service is idle. I hve tried all possible values for update mode of both the panels but couldn't solve this issue
Please provide help on how to solve this problem
Thanx in advance
|
|
|
|
|
When you're setting your button state also call updatepanel2.Update().
|
|
|
|
|
thanx.
Enable/Disable is working now, but after the button is enabled, it doesn't raise it's click event. Do i have to add a trigger for the event in the updatepanel.
|
|
|
|
|
Do you really need the extra update panel to set the button status? Couldn't this be accomplished with an Ajax call from the client-side? If I understand correctly all you need is a boolean response to set the disabled attribute on the button, correct?
only two letters away from being an asset
|
|
|
|
|
Hi
Thanx for replying. You are right that i need only a boolean response to enable/disable the btn. I am very new to ajax controls and am not familiar with ""Ajax call from the client-side". It would be nice of you, if u forward some more help on the topic.
Thanx
|
|
|
|
|
It doesn't involve an Ajax control, the controls just put a nice wrapper around Ajax functionality. Use a PageMethod in your code behind
[PageMethod]<br />
public static bool GetStatus()<br />
{<br />
return ?<br />
}
On the client-side
function CheckStatus()<br />
{<br />
btn.disabled = PageMethods.GetStatus();<br />
}
only two letters away from being an asset
|
|
|
|
|
Thanx
I am quite new to ajax and am unable to understand what to do with the code snippet u have forwarded me. it would be nice of you if u forward an article or may be a bit more detailed example.
Thanx again and sorry for inconvenience.
|
|
|
|
|
|
Thanx and sorry for inconvenience.
|
|
|
|
|
Wow - you sure got a lot of help for someone who doesn't even bother to upvote the people who answer. It seems to me like you're one of the army of people churning out outsourced websites, with no real idea of what they are doing. Why don't you rise above your peers, and buy a book or two and actually read it ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Well, I 5d you, you sure earned it.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
only two letters away from being an asset
|
|
|
|
|
oh, i am really sorry.
I appreciate and acknowledge all the help provided to me. Thankyou and thanks to all people who have helped me in this forum. I will try my best to acknowledge using rating from now...
Thankyou &
Sorry.
|
|
|
|
|
oh, i am really sorry.
I appreciate and acknowledge all the help provided to me. Thankyou to all people who have helped me in this forum. I will try my best to acknowledge using rating from now...
Thankyou &
Sorry.
|
|
|
|
|
Hello,
I am having a variable (of type Int32) declared in a SSIS package for which the value is passed as a parameter from the C# code when i am calling the package. I have also declared its scope as global variable for the package. There are three tasks which i am having in the package and all of them use the same variable. I have also given a default value as 0 (since it is of type int32) for the varibale.
Now when i run the package, for the first task it takes the value which is been passed as a parameter and executes the task well. But after that the variable gets reset to 0, which is the default value, and rest of the tasks execute for the value 0, which is wrong. Can anyone help me out in how to retain the value which is passed as the parameter to the variable throughout the package? Thanks in advance....
Benson
|
|
|
|
|
Hi All ,
I have one web site which is not ajax enabled and developed in vs2005 now we want to enable ajax i tried to find out the process in .net but i am not able to find out proper one can any one tell me about the process and where will i find the related software.
Thanks to all,
Amit Patel
|
|
|
|
|
Install the AJAX extension from here[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Amit Patel1985 wrote: I have one web site which is not ajax enabled
Rubbish. Every website is 'AJAX enabled', AJAX happens in the browser, using javascript.
It would be wise for you to be one of the minority of people who actually understands what AJAX is, instead of blindly using a library. That you couldn't even google to find out where the ASP.NET AJAX library is downloaded from, does not give me hope.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|